MAC平台卸载dnscrypt的方法

dnscrypt越来越不好用了,起不到应用的作用还经常自动重置DNS地址,干脆卸载算了。于是经过一番搜索后找到了卸载的方法。


打开这个项目的git页面:https://github.com/opendns/dnscrypt-osx-client

MAC平台卸载dnscrypt的方法_第1张图片


下载里边的Apple脚本执行就搞定了。

或者复制粘贴执行下面的脚本,总之内容都是一样的。

set question to display dialog "Do you really want to uninstall DNSCrypt from this computer?" buttons {"Yes", "No"} default button "No" giving up after 10
set answer to button returned of question

if answer is equal to "Yes" then
	do shell script "cd /Library/PreferencePanes/DNSCrypt.prefPane/Contents/Resources/usr/scripts ; /Library/PreferencePanes/DNSCrypt.prefPane/Contents/Resources/usr/scripts/set-dns-to-dhcp.sh; pkill -f '/Applications/System Preferences.app';launchctl remove com.opendns.osx.DNSCryptMenuBar; launchctl remove com.opendns.osx.DNSCryptConfigUpdater; launchctl remove com.opendns.osx.DNSCryptAfterboot; launchctl remove com.opendns.osx.DNSCryptConsoleChange; launchctl remove com.opendns.osx.DNSCryptControlChange; launchctl remove com.opendns.osx.DNSCryptNetworkChange; rm -f /var/run/dnscrypt*; pkill dns-updater; pkill DNSCrypt-Menubar; sleep 5; for i in '/Library/LaunchDaemons/com.opendns.osx.DNSCryptAfterboot.plist' '/Library/LaunchDaemons/com.opendns.osx.DNSCryptConsoleChange.plist' '/Library/LaunchDaemons/com.opendns.osx.DNSCryptControlChange.plist' '/Library/LaunchDaemons/com.opendns.osx.DNSCryptNetworkChange.plist' '/Library/LaunchAgents/com.opendns.osx.DNSCryptMenuBar.plist' '/Library/LaunchDaemons/com.opendns.osx.DNSCryptConfigUpdater.plist' '/Applications/DNSCrypt-Menubar.app' '/Library/Application Support/DNSCrypt Updater' '/Library/Application Support/DNSCrypt' ~'/Library/Application Support/DNSCrypt Prefpane' '/Library/PreferencePanes/DNSCrypt.prefPane' '/usr/local/sbin/dnscrypt-proxy' '/usr/local/bin/alarmer' '/usr/local/bin/hostip' '/usr/local/share/man/man8/hostip.8' '/usr/local/share/man/man8/dnscrypt-proxy.8' '/usr/local/lib/dnscrypt-proxy' '/usr/local/share/dnscrypt-proxy' '/var/log/dnscrypt-query.log'; do rm -fr \"$i\"; done" with administrator privileges
	display alert "DNSCrypt has been sucessfully removed from this computer."
end if


不过这个应用的menu bar却不一定会卸载掉,就像图中这样。

1.删除Applications文件夹中的

2.删除/Library/LaunchDaemons文件夹中的以下文件:



如果出现无法删除的情况,删除前先强制退出应用。


你可能感兴趣的:(其他)