-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathuninstall-packages.sh
46 lines (25 loc) · 1.11 KB
/
uninstall-packages.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#!/bin/sh
## Remove application
sudo /bin/rm -r /Applications/Packages.app
## stop and unload dispatcher
if [ -f /Library/LaunchDaemons/fr.whitebox.packages.build.dispatcher.plist ]; then
sudo /bin/launchctl unload /Library/LaunchDaemons/fr.whitebox.packages.build.dispatcher.plist
fi
if [ -f /Library/LaunchDaemons/fr.whitebox.packages_dispatcher.plist ]; then
sudo /bin/launchctl unload /Library/LaunchDaemons/fr.whitebox.packages_dispatcher.plist
fi
## remove launchdaemons
sudo /bin/rm -f /Library/LaunchDaemons/fr.whitebox.packages.build.dispatcher.plist
sudo /bin/rm -f /Library/LaunchDaemons/fr.whitebox.packages_dispatcher.plist
## Remove Priviledged tools
sudo /bin/rm -r /Library/PrivilegedHelperTools/fr.whitebox.packages
## Remove Application Support files
sudo /bin/rm -r /Library/Application\ Support/fr.whitebox.packages
## Remove tools
sudo /bin/rm -f /usr/local/bin/goldin_64
sudo /bin/rm -f /usr/local/bin/goldin
sudo /bin/rm /usr/local/bin/packagesbuild
sudo /bin/rm /usr/local/bin/packagesutil
## Forget we ever got installed
sudo /usr/sbin/pkgutil --forget fr.whitebox.pkg.Packages
exit 0