Skip to content

Instantly share code, notes, and snippets.

@htlin222
Created August 1, 2025 04:27
Show Gist options
  • Save htlin222/14687438f153a214262e9fe598f3c4a4 to your computer and use it in GitHub Desktop.
Save htlin222/14687438f153a214262e9fe598f3c4a4 to your computer and use it in GitHub Desktop.
Remove Microsoft AutoUpdate from macOS
#!/bin/bash
echo "Removing Microsoft AutoUpdate..."
# Kill any running Microsoft AutoUpdate processes
echo "Killing Microsoft AutoUpdate processes..."
# Find PIDs of Microsoft AutoUpdate processes
PIDS=$(ps aux | grep -i "Microsoft AutoUpdate" | grep -v grep | awk '{print $2}')
if [ -n "$PIDS" ]; then
echo "Found Microsoft AutoUpdate processes with PIDs: $PIDS"
for PID in $PIDS; do
echo "Killing process $PID..."
kill -9 $PID 2>/dev/null || true
done
echo "Processes killed."
else
echo "No Microsoft AutoUpdate processes found running."
fi
# Also check for any processes running from the MAU directory
MAU_PIDS=$(ps aux | grep "/Library/Application Support/Microsoft/MAU2.0" | grep -v grep | awk '{print $2}')
if [ -n "$MAU_PIDS" ]; then
echo "Found additional MAU processes with PIDs: $MAU_PIDS"
for PID in $MAU_PIDS; do
echo "Killing MAU process $PID..."
kill -9 $PID 2>/dev/null || true
done
fi
# Unload launch agents and daemons
echo "Unloading launch agents and daemons..."
launchctl unload /Library/LaunchAgents/com.microsoft.update.agent.plist 2>/dev/null || true
launchctl unload /Library/LaunchDaemons/com.microsoft.autoupdate.helper.plist 2>/dev/null || true
# Remove launch agents and daemons
echo "Removing launch agents and daemons..."
rm -f /Library/LaunchAgents/com.microsoft.update.agent.plist
rm -f /Library/LaunchDaemons/com.microsoft.autoupdate.helper.plist
# Remove Microsoft AutoUpdate application
echo "Removing Microsoft AutoUpdate application..."
rm -rf "/Library/Application Support/Microsoft/MAU2.0"
# Remove Microsoft AutoUpdate preferences
echo "Removing preferences..."
rm -rf ~/Library/Preferences/com.microsoft.autoupdate*
rm -rf ~/Library/Caches/com.microsoft.autoupdate*
# Remove any remaining Microsoft Update components
echo "Removing additional update components..."
rm -rf ~/Library/Application\ Support/Microsoft\ AutoUpdate
rm -rf ~/Library/Logs/Microsoft\ AutoUpdate
echo "Microsoft AutoUpdate has been removed!"
echo ""
echo "Note: This will prevent automatic updates for Microsoft Office applications."
echo "You'll need to manually update Office apps in the future if needed."
@htlin222
Copy link
Author

htlin222 commented Aug 1, 2025

Permanently removes Microsoft AutoUpdate to stop automatic update popups. The script:

  • Identifies and kills all Microsoft AutoUpdate processes by PID
  • Unloads and removes launch agents/daemons
  • Deletes the AutoUpdate application and preferences
  • Prevents future automatic updates for Microsoft Office apps

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment