How to Manually Uninstall DesktopServer from a Mac

We highly recommend that you uninstall DesktopServer via the automated method.

However, if you find you need to remove DesktopServer manually, this document lists the steps required. Please note that these directions only apply to computers running DesktopServer for the Mac operating system.

WARNING:

This document describes how you may modify settings by entering commands in the Terminal application. Users unfamiliar with Terminal and UNIX-style environments should proceed with caution. The entry of incorrect commands may result in data loss and/or unusable system software. Improper alteration of system files can result in reduced system security and/or exposure of private data.

1) Stop Web and Database Services (Close MySQL and Apache Processes)

To perform a manual uninstall, please ensure that the MySQL server and Apache web server process are not running. You may stop these processes from running by doing either of the following:

  • Reboot your system. 
    • By default, neither Apache or MySQL are configured to start on login. 
    • These processes should not be running after restarting your system.
  • Use DesktopServer to Stop Services
    • Run DesktopServer
    • Select the first option to “Stop or restart the web and database services”.
    • Then, select “Stop the web and database services”. 
    • Close DesktopServer after stopping the services.

2) Verify MySQL and Apache are not running. 

Please be sure to verify that both MySQL and Apache are not running by checking your Activity Monitor: 

  1. First, start the Activity Monitor app from your Applications/Utilities folder and be sure to set the drop down combo box to All Processes.
  2. Next, click to highlight the mysqld or httpd process in the Process Name column (one or more instances of httpd may appear). You can arrange the column by alphabetical order by clicking the column name.
  3. Click the Sample Process icon in the toolbar to locate the path of the running process.

The path should reveal the folder on your hard drive of where the Apache web server (httpd) or MySQL database server is running from. The parent folder should begin with /Applications/XAMPP. If the folder path differs, you have a conflicting process from another web or MySQL server installation. Apache web server and MySQL database services are not running when the httpd and mysqld processes are not listed.

3) Close XAMPP / DesktopServer Related Services and Applications

In addition to making sure that httpd and mysqld are not running in your Activity Monitor, you should close any related XAMPP applications such as DesktopServer, Trace, XAMPP Control, and any other apps from the Applications/XAMPP folder.

4) Remove XAMPP / DesktopServer Related Files

With all related applications and services closed, you can now delete the DesktopServer related files:

  1. Drag the XAMPP folder from your Applications folder to the trash bin and empty it.

5) Remove the DesktopServer Preferences File

Lastly, you can remove the DesktopServer preferences file that holds a list of all your created websites and related databases:

  1. Start the Terminal app from your Applications/Utilities folder.
  2. Carefully type the following command on one line and press the return key (you will be prompted for your Macintosh login password):
  3. sudo rm /Users/Shared/.com.serverpress.desktopserver.json
    	
  4. You can now quit the Terminal.app application (via the pull down menu).

6) Restore Your Original System Hosts File

This last item is optional. 

You can restore your system host file back to the original settings prior to DesktopServer installation. Minor modifications are made to this file to list all of the websites that you have active in DesktopServer. When you remove sites from DesktopServer, these entries are also removed. Removing DesktopServer without first removing websites may leave this list un-updated but will not affect normal system operation. 

Follow the steps below to restore your hosts file back to the original settings.

  1. Click Finder and select the pull down menu Go -> Go to Folder (or simply press Command+Shift+G).
  2. Type /etc/ in the “Go to Folder” text box.
  3. Locate the hosts.ds_backup file in the /etc folder and drag it to your desktop.
  4. Rename the hosts.ds_backup file to hosts (with no extension)
  5. Drag the file back to your /etc folder, replacing your existing hosts file.

Following the steps above will restore your system to the original settings prior to DesktopServer installation.