How to Completely Uninstall XScreenSaver on Mac (No Leftovers)

English Français Deutsch やまと Português Türkçe

Summary: If you no longer wish to use XScreenSaver on your Mac, you can completely uninstall it by using Terminal commands, manually removing related files, or using an easy-to-use tool like CleanMyApp.

summary-uninstall-xscreensaver

XScreenSaver is a collection of screen savers that is compatible with macOS's built-in screen saving functionality, offering additional animation effects and customizable options.

For various reasons, you may want to safely uninstall it. If uninstalled improperly, leftover files may affect your computer's performance over time. This article provides three methods to completely uninstall XScreenSaver and explains how to resolve the xdg-screensaver error that may occur after uninstallation.

If you're concerned about losing your desktop environment after uninstalling XScreenSaver, you can back it up first to ensure that no important files or settings are lost during the uninstallation process.

Uninstall  XScreenSaver using a third-party uninstaller (the best way)

When it comes to uninstalling an application on a Mac, the quickest and easiest method is to use a third-party tool like CleanMyApp. These uninstallation tools help you completely remove unwanted software and its leftover files with just one click.

Moreover, CleanMyApp is a professional uninstaller, so you don't have to worry about it taking up much of your system space. It also supports batch uninstallation, allowing you to select multiple apps you want to remove and click "Uninstall" to remove them all at once.

Here is how to uninstall XScreenSaver using CleanMyApp:

  1. Free download and install CleanMyApp on your Mac.
  2. Open CleanMyApp and select the XScreenSaver program.
    select-xscreensaver-related-program
  3. Click Uninstall.
  4. Click Continue uninstall when you are prompted to confirm the uninstallation.
    cllick-continue-uninstall-cleanmyapp
  5. Enter your admin password if you are asked. 
  6. Click Finish when XScreenSaver is completely uninstalled. 

Share CleanMyApp with more people to help them completely uninstall XScreenSaver!

Uninstall  XScreenSaver via Terminal

Sure, you can uninstall XScreenSaver through Terminal, which ensures that all files and configurations related to XScreenSaver are removed, leaving no residual files and preventing wasted system space.

However, Terminal requires users to have some technical knowledge. If you're not familiar with command-line operations, entering commands incorrectly may accidentally delete other files or system configurations, potentially causing other issues.

Here is how to uninstall XScreenSaver by Terminal:

  1. Open Terminal. You can press Command + Space, search for Terminal, and open it.
  2. Enter the following command to locate files or folders related to XScreenSaver: sudo find / -name "*xscreensaver*" 
  3. If you installed XScreenSaver in the /Applications folder, run the following command to delete the main application:sudo rm -rf /Applications/XScreenSaver.app 
  4. Remove configuration files and related leftovers: sudo rm -rf ~/Library/Preferences/org.x.XScreenSaver.plist 
    sudo rm -rf ~/Library/Application\ Support/XScreenSaver 
    sudo rm -rf ~/Library/Saved\ Application\ State/org.x.XScreenSaver.savedState 
  5. Refresh the system cache: killall cfprefsd

After completing the uninstallation process, it's recommended to restart your Mac to make sure all changes take effect.

 Note: Be very careful when entering these Terminal commands.  A small mistake could lead to deleting important files and cause system issues. If you're worried about making an error, it is recommended to use CleanMyApp mentioned above.

Manually uninstall  XScreenSaver on Mac

In addition to use a third-party uninstaller or Terminal, you can also manually uninstall XScreenSaver.  However, manual uninstallation can be time-consuming and tedious, as you'll need to carefully locate and delete files from multiple locations.

If you decide to uninstall XScreenSaver manually, just follow the steps below!

  1. Quit the XScreenSaver application. You can find the XScreenSaver icon in the top menu bar, right-click it, and select "Quit."
  2. Open Finder, go to the /Applications folder, locate XScreenSaver.app, right-click it, and choose Move to Trash.
    move-xscreensaver-to-trash
  3. Open Finder again, press Command + Shift + G, and navigate to the following paths one by one. Manually delete any files and folders related to XScreenSaver:
    ~/Library/Preferences/org.x.XScreenSaver.plist
    ~/Library/Application Support/XScreenSaver
    ~/Library/Saved Application State/org.x.XScreenSaver.savedState 
    manually-delete-xscreensaver-related-files
  4. Empty the Trash to completely free up space.
  5. Restart your Mac.

Keep in mind that manual uninstallation can easily leave behind leftover files. If certain hidden files aren't completely removed, they may still occupy system resources. So be sure to carefully check and delete all associated files to fully uninstall XScreenSaver.

Share the above three methods if you find them useful!

Fix the xdg-screensaver error after uninstalling XScreenSaver

When you uninstall XScreenSaver, if your system or some programs (such as the desktop environment or power management tools) still try to call the xdg-screensaver command, you may encounter a "xdg-screensaver not found" error.

In this case, you can fix the issue using the following methods. Terminal commands are needed in the whole process, so make sure you are concentrated on it.

Method 1: Reinstall xdg-utils 

Sometimes, the xdg-screensaver command is part of the xdg-utils package, and not necessarily dependent on XScreenSaver itself.

You can reinstall xdg-utils to restore the basic xdg-screensaver script and avoid errors even if XScreenSaver is no longer installed.

Open Terminal and run the following commands:sudo apt update 
sudo apt install --reinstall xdg-utils

Method 2: Create a Dummy xdg-screensaver Script

If you prefer not to reinstall XScreenSaver and still want to prevent the error, you can create a dummy xdg-screensaver script that does nothing.

  1. Open Terminal. 
  2. Create a dummy script by entering: sudo nano /usr/local/bin/xdg-screensaver 
  3. Add the following lines: #!/bin/bash 
    exit 0 
  4. Save and exit (press Control + O to save, Control + X to exit). 
  5. Make the script executable: sudo chmod +x /usr/local/bin/xdg-screensaver

Conclusion

If you feel that XScreenSaver no longer serves any purpose for you, be sure to choose one of the methods above to completely uninstall it.

Over time, leftover files from unused applications like XScreenSaver can gradually take up valuable system space and make your Mac run slowly.

If you think this article is insightful, please share it with your friends!