mac os 完全删除雷云脚本

# How to uninstall Razer Synapse 2 ( https://www.razerzone.com/synapse-2 )
# on OS X (10.11-10.13) (El Capitan, Sierra, High Sierra)
# without using Razer's official uninstall tool.

# Tested on OS X 10.11.5 in July 2016.
# Edited with additional steps for later OS X versions,
# contributed by commenters on this gist.

# Step 1: In your terminal: stop and remove launch agents
launchctl remove com.razer.rzupdater
launchctl remove com.razerzone.rzdeviceengine
sudo rm /Library/LaunchAgents/com.razer.rzupdater.plist
sudo rm /Library/LaunchAgents/com.razerzone.rzdeviceengine.plist

# Step 2: Remove HID kernel extension.
sudo rm -Rf /System/Library/Extensions/RazerHid.kext
# OS X High Sierra: (Thanks to @DanThomson)
sudo rm -Rf /Library/Extensions/RazerHid.kext

# Step 3: Manually delete Razer Synapse app from Applications in Finder

# Step 4: Delete Razer files from "Application Support" folders:
sudo rm -rf /Library/Application\ Support/Razer/
rm -rf ~/Library/Application\ Support/Razer/

# Step 5: Synapse sometimes leaves a certificate installed in your Keychain.
# To remove it, open Keychain Access and click on My Certificates.
# The certificate will be called Razer USA Ltd, delete it. (Thanks to @MTCoster)
# There might an item called RAZER_KEYCHAIN_ACCESS. No certificate,
# but I suppose if you want to get rid of EVERYTHING Razer,
# you may as well go ahead and delete that too. (Thanks to @blueExcess)

# Step 6: Restart your Mac.
# Expected results:
# - The Razer icon should be gone from the OS X menu bar now, and also not pop up sporadically either
# - The two processes "RzDeviceEngine" and "RzUpdater" should not be running when you check ActivityMonitor

@see https://gist.github.com/timotgl/ef04cfccafdf0b8b15151e7cc2a19d45git