Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

mart00

macrumors newbie
Original poster
Sep 17, 2019
4
1
Italy
hi,
first off, I'm a total noob.
I installed x quartz a few months ago, and then unistalled, but there definitely are some bits left.
Is there a quick way to remove it completely?
Thanks.
 
The core components of XQuartz are the XQuartz.app in Applications → Utilities and the X11 directory in the (hidden) /opt directory at the base of Macintosh HD volume (you can reveal it by pressing the shift + command + . keyboard shortcut). Deleting the app and the X11 directory (or the entire opt directory, if it isn’t used for anything else) should cover 99% of XQuartz.

Beyond that there are some .plist files in the /Library directory (also at the base of Macintosh HD volume) under LaunchDaemons and LaunchAgents (they have “xquartz” in their names) as well as under the /private/etc directory (which is also hidden and revealable with the above shortcut) under “manpaths.d” and “paths.d” (they also “xquartz” in their names).

I am hesitant to give you a Terminal command to remove these components, as you can do quite a bit of damage to your system if you are not careful. I would not recommend doing it if you are not familiar with Terminal. You should be fine if you remove the two large components manually.

You can use this Terminal command to list all the components, but it may show some false-positives:
Code:
find /Applications /opt /Library /private/etc \( -iname "*xquartz*" -or -name "*X11*" \) 2>/dev/null
 
  • Like
Reactions: Flint Ironstag
These are the folders & files installed by XQuartz.pkg
XQuartz.jpg

These are the commands to remove them
Code:
sudo rm -r /Applications/Utilities/XQuartz.app
sudo rm /Library/LaunchAgents/org.macosforge.xquartz.startx.plist
sudo rm /Library/LaunchDaemons/org.macosforge.xquartz.privileged_startx.plist
sudo rm -r /opt/X11
sudo rm /etc/manpaths.d/40-XQuartz
sudo rm /etc/paths.d/40-XQuartz
If you installed XQuartz with Homebrew, you can uninstall it with
Code:
brew cask uninstall xquartz
Take a look here to see what files are removed https://github.com/Homebrew/homebrew-cask/blob/master/Casks/xquartz.rb
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.