Skip to content
Discussion options

You must be logged in to vote

Here is the shell script I fully tested on Big Sur.

#!/bin/sh

_id=`id -u`
_cn="$0"
echo "${_cn} will run commands as root" >&2
case "${_id}" in
        0)      ;;
        *)      exec /usr/bin/sudo "${_cn}"
                ;;
esac

launchctl unload /Library/LaunchAgents/org.xquartz.startx.plist
launchctl unload /Library/LaunchDaemons/org.xquartz.privileged_startx.plist

rm -r /opt/X11
rm /Library/LaunchAgents/org.xquartz.startx.plist
rm /Library/LaunchDaemons/org.xquartz.privileged_startx.plist

rm -r /Applications/Utilities/XQuartz.app
rm /etc/paths.d/*-XQuartz
rm /etc/manpaths.d/*-XQuartz

# rm ~/Library/Preferences/org.xquartz.X11.plist
rm -r ~/Library/Caches/org.xquartz.X11
rm -r ~/L…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by jeremyhu
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants