
Create an uninstaller script
Reported by Alex (via GPGTools) | January 4th, 2011 @ 01:30 PM | in 2.0.18 (closed)
Comments and changes to this ticket
-
-
Benjamin Donnachie January 4th, 2011 @ 11:26 PM
- State changed from new to hold
This is dependent upon #3.
-
Alex (via GPGTools) January 5th, 2011 @ 05:45 PM
What about this solution?
for bom in `find MacGPG2-2.0.16.mpkg -name Archive.bom`; do lsbom -fs $bom >> uninstallMacGPG2-2.0.16.sh; done sed -i .bak -e "s/^\./rm \/usr\local/" uninstallMacGPG2-2.0.16.sh
Then you can start "sudo sh uninstallMacGPG2-2.0.16.sh" and all installed files are gone.
But be careful! This code might break your system.
-
Benjamin Donnachie January 5th, 2011 @ 06:53 PM
I haven't had chance to investigate but suspect paths will need to be
prefixed with /usr/local/Should you have chance before me, please generate script and send to
me for testing.Take care,
Ben
Sent from my iPhone
-
Jesse Gonzalez January 6th, 2011 @ 03:25 AM
try this instead.
!/bin/bash
cd /Users/jesse.gonzalez/Downloads
for bom infind MacGPG2-2.0.16.mpkg -name Archive.bom
do
echo "Removing files installed with the 'bill of materials' file $bom..." info_plist=dirname $bom
/Info.plistprefix=
awk '/IFPkgFlagDefaultLocation/ {getline; print $1}' $info_plist| sed -e 's/<string\>\(.*\)\<\/string\>/\1/'
for file inlsbom -fslbc $bom | sed -e 's/\.\///'
doecho " Removing $prefix$file..." sudo rm $prefix$file
done echo done
-
Jesse Gonzalez January 6th, 2011 @ 03:26 AM
#!/bin/bash cd /Users/jesse.gonzalez/Downloads for bom in `find MacGPG2-2.0.16.mpkg -name Archive.bom` do echo "Removing files installed with the 'bill of materials' file $bom..." info_plist=`dirname $bom`/Info.plist prefix=`awk '/IFPkgFlagDefaultLocation/ {getline; print $1}' $info_plist| sed -e 's/<string\>\(.*\)\<\/string\>/\1/'` for file in `lsbom -fslbc $bom | sed -e 's/\.\///'` do echo " Removing $prefix$file..." sudo rm $prefix$file done echo done
-
Alex (via GPGTools) January 6th, 2011 @ 06:53 AM
Nice. Looks good for me. If this works fine we could publish a small general pkg uninstaller app.
-
Alex (via GPGTools) January 6th, 2011 @ 07:11 AM
Two issues so far:
- /Applications/start-gpg-agent.app is not deleted (just some
files)
- It breaks an existing GnuPG 1 installation (I ran the uninstaller script after installing GPGTools).
- /Applications/start-gpg-agent.app is not deleted (just some
files)
-
Benjamin Donnachie January 16th, 2011 @ 12:08 PM
- State changed from hold to resolved
v2.0.17 installer wil remove an existing v2.0.16 installation but leave v1.4.x alone.
So, to uninstall, install v2.0.17 (Currently RC) and then:
sudo rm -fr /usr/local/MacGPG2
sudo rm -fr /Applications/start-gpg-agent.app
sudo rm /Library/LaunchAgents/com.sourceforge.macgpg2.gpg-agent.plist -
Alex (via GPGTools) January 16th, 2011 @ 02:23 PM
In this context: I've removed (all? old) gpg1/gpg2 related files using:
for i in `find /usr/local/bin/ /usr/local/libexec/ /usr/local/share/ -iname "gpg*"`; do \ rm "$i"; done
-
Benjamin Donnachie January 16th, 2011 @ 02:27 PM
The code below removes everything installed by MacGPG2 v2.0.16, however, it may also affect other Unix-style programs that depend upon these libraries and I am considering leaving the library files intact.
Remove all GnuPG v2.0.16 related files
rm -f /usr/local/lib/charset.alias
rm -f /usr/local/lib/gettext
rm -f /usr/local/lib/gettext/hostname
rm -f /usr/local/lib/gettext/project-id
rm -f /usr/local/lib/gettext/urlget
rm -f /usr/local/lib/gettext/user-email
rm -f /usr/local/lib/libasprintf.0.0.0.dylib
rm -f /usr/local/lib/libasprintf.0.dylib
rm -f /usr/local/lib/libasprintf.dylib
rm -f /usr/local/lib/libasprintf.la
rm -f /usr/local/lib/libgettextlib-0.17.dylib
rm -f /usr/local/lib/libgettextlib.dylib
rm -f /usr/local/lib/libgettextlib.la
rm -f /usr/local/lib/libgettextpo.0.4.0.dylib
rm -f /usr/local/lib/libgettextpo.0.dylib
rm -f /usr/local/lib/libgettextpo.dylib
rm -f /usr/local/lib/libgettextpo.la
rm -f /usr/local/lib/libgettextsrc-0.17.dylib
rm -f /usr/local/lib/libgettextsrc.dylib
rm -f /usr/local/lib/libgettextsrc.la
rm -f /usr/local/lib/libintl.8.0.2.dylib
rm -f /usr/local/lib/libintl.8.dylib
rm -f /usr/local/lib/libintl.dylib
rm -f /usr/local/lib/libintl.la
rm -f /usr/local/bin/gpg-agent
rm -f /usr/local/bin/gpg-connect-agent
rm -f /usr/local/bin/gpg2
rm -f /usr/local/bin/gpgconf
rm -f /usr/local/bin/gpgkey2ssh
rm -f /usr/local/bin/gpgparsemail
rm -f /usr/local/bin/gpgsm
rm -f /usr/local/bin/gpgsm-gencert.sh
rm -f /usr/local/bin/gpgv2
rm -f /usr/local/bin/kbxutil
rm -f /usr/local/bin/scdaemon
rm -f /usr/local/bin/watchgnupg
rm -f /usr/local/libexec/gnupg-pcsc-wrapper
rm -f /usr/local/libexec/gpg-check-pattern
rm -f /usr/local/libexec/gpg-preset-passphrase
rm -f /usr/local/libexec/gpg-protect-tool
rm -f /usr/local/libexec/gpg2keys_curl
rm -f /usr/local/libexec/gpg2keys_finger
rm -f /usr/local/libexec/gpg2keys_hkp
rm -f /usr/local/libexec/gpg2keys_ldap
rm -f /usr/local/sbin/addgnupghome
rm -f /usr/local/sbin/applygnupgdefaults
rm -f /usr/local/share/doc
rm -f /usr/local/share/doc/gnupg
rm -f /usr/local/share/doc/gnupg/DETAILS
rm -f /usr/local/share/doc/gnupg/examples
rm -f /usr/local/share/doc/gnupg/examples/gpgconf.conf
rm -f /usr/local/share/doc/gnupg/examples/pwpattern.list
rm -f /usr/local/share/doc/gnupg/examples/README
rm -f /usr/local/share/doc/gnupg/examples/scd-event
rm -f /usr/local/share/doc/gnupg/examples/trustlist.txt
rm -f /usr/local/share/doc/gnupg/FAQ
rm -f /usr/local/share/doc/gnupg/faq.html
rm -f /usr/local/share/doc/gnupg/HACKING
rm -f /usr/local/share/doc/gnupg/KEYSERVER
rm -f /usr/local/share/doc/gnupg/OpenPGP
rm -f /usr/local/share/doc/gnupg/README
rm -f /usr/local/share/doc/gnupg/TRANSLATE
rm -f /usr/local/share/gnupg/com-certs.pem
rm -f /usr/local/share/gnupg/gpg-conf.skel
rm -f /usr/local/share/gnupg/help.be.txt
rm -f /usr/local/share/gnupg/help.ca.txt
rm -f /usr/local/share/gnupg/help.cs.txt
rm -f /usr/local/share/gnupg/help.da.txt
rm -f /usr/local/share/gnupg/help.de.txt
rm -f /usr/local/share/gnupg/help.el.txt
rm -f /usr/local/share/gnupg/help.eo.txt
rm -f /usr/local/share/gnupg/help.es.txt
rm -f /usr/local/share/gnupg/help.et.txt
rm -f /usr/local/share/gnupg/help.fi.txt
rm -f /usr/local/share/gnupg/help.fr.txt
rm -f /usr/local/share/gnupg/help.gl.txt
rm -f /usr/local/share/gnupg/help.hu.txt
rm -f /usr/local/share/gnupg/help.id.txt
rm -f /usr/local/share/gnupg/help.it.txt
rm -f /usr/local/share/gnupg/help.ja.txt
rm -f /usr/local/share/gnupg/help.nb.txt
rm -f /usr/local/share/gnupg/help.pl.txt
rm -f /usr/local/share/gnupg/help.pt.txt
rm -f /usr/local/share/gnupg/help.pt_BR.txt
rm -f /usr/local/share/gnupg/help.ro.txt
rm -f /usr/local/share/gnupg/help.ru.txt
rm -f /usr/local/share/gnupg/help.sk.txt
rm -f /usr/local/share/gnupg/help.sv.txt
rm -f /usr/local/share/gnupg/help.tr.txt
rm -f /usr/local/share/gnupg/help.txt
rm -f /usr/local/share/gnupg/help.zh_CN.txt
rm -f /usr/local/share/gnupg/help.zh_TW.txt
rm -f /usr/local/share/gnupg/qualified.txt
rm -f /usr/local/share/info/dir
rm -f /usr/local/share/info/gnupg.info
rm -f /usr/local/share/info/gnupg.info-1
rm -f /usr/local/share/info/gnupg.info-2
rm -f /usr/local/share/locale/be
rm -f /usr/local/share/locale/be/LC_MESSAGES
rm -f /usr/local/share/locale/be/LC_MESSAGES/gnupg2.mo
rm -f /usr/local/share/locale/ca
rm -f /usr/local/share/locale/ca/LC_MESSAGES
rm -f /usr/local/share/locale/ca/LC_MESSAGES/gnupg2.mo
rm -f /usr/local/share/locale/cs
rm -f /usr/local/share/locale/cs/LC_MESSAGES
rm -f /usr/local/share/locale/cs/LC_MESSAGES/gnupg2.mo
rm -f /usr/local/share/locale/da
rm -f /usr/local/share/locale/da/LC_MESSAGES
rm -f /usr/local/share/locale/da/LC_MESSAGES/gnupg2.mo
rm -f /usr/local/share/locale/de
rm -f /usr/local/share/locale/de/LC_MESSAGES
rm -f /usr/local/share/locale/de/LC_MESSAGES/gnupg2.mo
rm -f /usr/local/share/locale/el
rm -f /usr/local/share/locale/el/LC_MESSAGES
rm -f /usr/local/share/locale/el/LC_MESSAGES/gnupg2.mo
rm -f /usr/local/share/locale/en@boldquot
rm -f /usr/local/share/locale/en@boldquot/LC_MESSAGES
rm -f /usr/local/share/locale/en@boldquot/LC_MESSAGES/gnupg2.mo
rm -f /usr/local/share/locale/en@quot
rm -f /usr/local/share/locale/en@quot/LC_MESSAGES
rm -f /usr/local/share/locale/en@quot/LC_MESSAGES/gnupg2.mo
rm -f /usr/local/share/locale/eo
rm -f /usr/local/share/locale/eo/LC_MESSAGES
rm -f /usr/local/share/locale/eo/LC_MESSAGES/gnupg2.mo
rm -f /usr/local/share/locale/es
rm -f /usr/local/share/locale/es/LC_MESSAGES
rm -f /usr/local/share/locale/es/LC_MESSAGES/gnupg2.mo
rm -f /usr/local/share/locale/et
rm -f /usr/local/share/locale/et/LC_MESSAGES
rm -f /usr/local/share/locale/et/LC_MESSAGES/gnupg2.mo
rm -f /usr/local/share/locale/fi
rm -f /usr/local/share/locale/fi/LC_MESSAGES
rm -f /usr/local/share/locale/fi/LC_MESSAGES/gnupg2.mo
rm -f /usr/local/share/locale/fr
rm -f /usr/local/share/locale/fr/LC_MESSAGES
rm -f /usr/local/share/locale/fr/LC_MESSAGES/gnupg2.mo
rm -f /usr/local/share/locale/gl
rm -f /usr/local/share/locale/gl/LC_MESSAGES
rm -f /usr/local/share/locale/gl/LC_MESSAGES/gnupg2.mo
rm -f /usr/local/share/locale/hu
rm -f /usr/local/share/locale/hu/LC_MESSAGES
rm -f /usr/local/share/locale/hu/LC_MESSAGES/gnupg2.mo
rm -f /usr/local/share/locale/id
rm -f /usr/local/share/locale/id/LC_MESSAGES
rm -f /usr/local/share/locale/id/LC_MESSAGES/gnupg2.mo
rm -f /usr/local/share/locale/it
rm -f /usr/local/share/locale/it/LC_MESSAGES
rm -f /usr/local/share/locale/it/LC_MESSAGES/gnupg2.mo
rm -f /usr/local/share/locale/ja
rm -f /usr/local/share/locale/ja/LC_MESSAGES
rm -f /usr/local/share/locale/ja/LC_MESSAGES/gnupg2.mo
rm -f /usr/local/share/locale/nb
rm -f /usr/local/share/locale/nb/LC_MESSAGES
rm -f /usr/local/share/locale/nb/LC_MESSAGES/gnupg2.mo
rm -f /usr/local/share/locale/pl
rm -f /usr/local/share/locale/pl/LC_MESSAGES
rm -f /usr/local/share/locale/pl/LC_MESSAGES/gnupg2.mo
rm -f /usr/local/share/locale/pt
rm -f /usr/local/share/locale/pt/LC_MESSAGES
rm -f /usr/local/share/locale/pt/LC_MESSAGES/gnupg2.mo
rm -f /usr/local/share/locale/pt_BR
rm -f /usr/local/share/locale/pt_BR/LC_MESSAGES
rm -f /usr/local/share/locale/pt_BR/LC_MESSAGES/gnupg2.mo
rm -f /usr/local/share/locale/ro
rm -f /usr/local/share/locale/ro/LC_MESSAGES
rm -f /usr/local/share/locale/ro/LC_MESSAGES/gnupg2.mo
rm -f /usr/local/share/locale/ru
rm -f /usr/local/share/locale/ru/LC_MESSAGES
rm -f /usr/local/share/locale/ru/LC_MESSAGES/gnupg2.mo
rm -f /usr/local/share/locale/sk
rm -f /usr/local/share/locale/sk/LC_MESSAGES
rm -f /usr/local/share/locale/sk/LC_MESSAGES/gnupg2.mo
rm -f /usr/local/share/locale/sv
rm -f /usr/local/share/locale/sv/LC_MESSAGES
rm -f /usr/local/share/locale/sv/LC_MESSAGES/gnupg2.mo
rm -f /usr/local/share/locale/tr
rm -f /usr/local/share/locale/tr/LC_MESSAGES
rm -f /usr/local/share/locale/tr/LC_MESSAGES/gnupg2.mo
rm -f /usr/local/share/locale/zh_CN
rm -f /usr/local/share/locale/zh_CN/LC_MESSAGES
rm -f /usr/local/share/locale/zh_CN/LC_MESSAGES/gnupg2.mo
rm -f /usr/local/share/locale/zh_TW
rm -f /usr/local/share/locale/zh_TW/LC_MESSAGES
rm -f /usr/local/share/locale/zh_TW/LC_MESSAGES/gnupg2.mo
rm -f /usr/local/share/man/man1
rm -f /usr/local/share/man/man1/gpg-agent.1
rm -f /usr/local/share/man/man1/gpg-connect-agent.1
rm -f /usr/local/share/man/man1/gpg-preset-passphrase.1
rm -f /usr/local/share/man/man1/gpg-zip.1
rm -f /usr/local/share/man/man1/gpg2.1
rm -f /usr/local/share/man/man1/gpgconf.1
rm -f /usr/local/share/man/man1/gpgparsemail.1
rm -f /usr/local/share/man/man1/gpgsm-gencert.sh.1
rm -f /usr/local/share/man/man1/gpgsm.1
rm -f /usr/local/share/man/man1/gpgv2.1
rm -f /usr/local/share/man/man1/scdaemon.1
rm -f /usr/local/share/man/man1/symcryptrun.1
rm -f /usr/local/share/man/man1/watchgnupg.1
rm -f /usr/local/share/man/man8
rm -f /usr/local/share/man/man8/addgnupghome.8
rm -f /usr/local/share/man/man8/applygnupgdefaults.8
rm -f /usr/local/lib/libassuan.0.dylib
rm -f /usr/local/lib/libassuan.dylib
rm -f /usr/local/lib/libassuan.la
rm -f /usr/local/bin/dumpsexp
rm -f /usr/local/bin/hmac256
rm -f /usr/local/lib/libgcrypt.11.6.0.dylib
rm -f /usr/local/lib/libgcrypt.11.dylib
rm -f /usr/local/lib/libgcrypt.dylib
rm -f /usr/local/lib/libgcrypt.la
rm -f /usr/local/bin/gpg-error
rm -f /usr/local/lib/libgpg-error.0.dylib
rm -f /usr/local/lib/libgpg-error.dylib
rm -f /usr/local/lib/libgpg-error.la
rm -f /usr/local/lib/charset.alias
rm -f /usr/local/lib/libcharset.1.dylib
rm -f /usr/local/lib/libcharset.dylib
rm -f /usr/local/lib/libcharset.la
rm -f /usr/local/lib/libiconv.2.dylib
rm -f /usr/local/lib/libiconv.dylib
rm -f /usr/local/lib/libiconv.la
rm -f /usr/local/lib/libksba.8.9.6.dylib
rm -f /usr/local/lib/libksba.8.dylib
rm -f /usr/local/lib/libksba.dylib
rm -f /usr/local/lib/libksba.la
rm -f /usr/local/lib/libusb-1.0.0.dylib
rm -f /usr/local/lib/libusb-1.0.dylib
rm -f /usr/local/lib/libusb-1.0.la
rm -f /usr/local/lib/libusb-0.1.4.dylib
rm -f /usr/local/lib/libusb.dylib
rm -f /usr/local/lib/libusb.la
rm -f /usr/local/lib/libpth.20.0.27.dylib
rm -f /usr/local/lib/libpth.20.dylib
rm -f /usr/local/lib/libpth.dylib
rm -f /usr/local/lib/libpth.la
rm -fr /usr/local/pinentry-mac.app -
Alex (via GPGTools) January 16th, 2011 @ 10:28 PM
- State changed from resolved to open
I think it's not resolved till there is some sort of uninstaller one can download (I propose to publish MacGPG2 using a compressed DMG like in GPGTools or GPGServices).
-
Benjamin Donnachie January 16th, 2011 @ 11:24 PM
- State changed from open to hold
Easy enough to write a script / AppleScript from the above.
-
Benjamin Donnachie January 21st, 2011 @ 01:25 PM
- State changed from hold to open
I'll create an AppleScript for the above in due course.
-
-
Alex (via GPGTools) February 14th, 2011 @ 08:28 AM
- Importance changed from High to Medium
Added an example script: installer/Uninstall.app.
-
steve February 17th, 2011 @ 08:37 PM
What's the status of this? Since you just created the dmg, can we close this?
-
Alex (via GPGTools) February 17th, 2011 @ 09:04 PM
Let someone confirm my script and then close it.
-- sent from my mobile phone
-
Mento February 17th, 2011 @ 09:14 PM
- State changed from open to resolved
The uninstaller works with MacGPG 2.0.17
-
Alex (via GPGTools) December 28th, 2011 @ 01:27 PM
- Milestone set to 2.0.18
- Importance changed from Medium to
-
steve June 18th, 2015 @ 04:42 PM
- State changed from resolved to released
- Importance cleared.
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป