feat(automation): add optimization scripts and update docs for EOD
Co-authored-by: Junie <junie@jetbrains.com>
This commit is contained in:
Executable
+64
@@ -0,0 +1,64 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
echo "Uninstalling Adobe Services, GOG, TeamViewer, Firebird, and Tunnelblick..."
|
||||
|
||||
# 1. Kill processes
|
||||
echo "Killing related processes..."
|
||||
sudo killall -9 TeamViewer "GOG Galaxy" Tunnelblick "Adobe Desktop Service" CCXProcess CoreSync "Adobe CCXProcess" "Creative Cloud" AdobeIPCBroker "Adobe CEF Helper" fbserver gds_drop 2>/dev/null || true
|
||||
|
||||
# 2. Unload Launch Daemons
|
||||
echo "Unloading System Daemons..."
|
||||
for daemon in /Library/LaunchDaemons/com.teamviewer.* /Library/LaunchDaemons/com.gog.* /Library/LaunchDaemons/net.tunnelblick.* /Library/LaunchDaemons/org.firebird.* /Library/LaunchDaemons/com.adobe.*; do
|
||||
if [ -f "$daemon" ]; then
|
||||
sudo launchctl unload "$daemon" 2>/dev/null || true
|
||||
sudo rm -f "$daemon"
|
||||
fi
|
||||
done
|
||||
|
||||
# 3. Unload Launch Agents
|
||||
echo "Unloading System Agents..."
|
||||
for agent in /Library/LaunchAgents/com.teamviewer.* /Library/LaunchAgents/com.gog.* /Library/LaunchAgents/com.adobe.*; do
|
||||
if [ -f "$agent" ]; then
|
||||
# Try both older unload and newer bootout just in case
|
||||
sudo launchctl unload "$agent" 2>/dev/null || true
|
||||
for uid in $(dscl . -list /Users UniqueID | awk '$2 >= 500 {print $2}'); do
|
||||
sudo launchctl bootout gui/$uid "$agent" 2>/dev/null || true
|
||||
done
|
||||
sudo rm -f "$agent"
|
||||
fi
|
||||
done
|
||||
|
||||
echo "Unloading User Agents..."
|
||||
for user_agent in ~/Library/LaunchAgents/com.adobe.*; do
|
||||
if [ -f "$user_agent" ]; then
|
||||
launchctl unload "$user_agent" 2>/dev/null || true
|
||||
rm -f "$user_agent"
|
||||
fi
|
||||
done
|
||||
|
||||
# 4. Remove App Directories
|
||||
echo "Removing Application Files..."
|
||||
sudo rm -rf "/Applications/TeamViewer.app"
|
||||
sudo rm -rf "/Applications/GOG Galaxy.app"
|
||||
sudo rm -rf "/Applications/Tunnelblick.app"
|
||||
|
||||
# Firebird standard manual installation locations
|
||||
sudo rm -rf "/Library/Frameworks/Firebird.framework"
|
||||
sudo rm -rf "/opt/firebird"
|
||||
|
||||
# Common Adobe paths
|
||||
sudo rm -rf "/Applications/Adobe"*
|
||||
sudo rm -rf "/Applications/Utilities/Adobe"*
|
||||
|
||||
# Application Support
|
||||
sudo rm -rf "/Library/Application Support/Adobe"
|
||||
sudo rm -rf "/Library/Application Support/TeamViewer"
|
||||
sudo rm -rf "/Library/Application Support/GOG.com"
|
||||
sudo rm -rf "/Library/Application Support/Tunnelblick"
|
||||
|
||||
# Try homebrew just in case some were installed via brew casks
|
||||
echo "Checking Homebrew casks..."
|
||||
brew uninstall --cask tunnelblick teamviewer gog-galaxy 2>/dev/null || true
|
||||
brew uninstall firebird 2>/dev/null || true
|
||||
|
||||
echo "Uninstallation finished successfully."
|
||||
Reference in New Issue
Block a user