How to Completely Uninstall ServBay
ServBay is designed to be an easy-to-manage and maintain local web development environment. If you need to remove ServBay from your macOS system, the uninstallation process is straightforward. This article provides detailed steps to guide you through fully uninstalling ServBay and cleaning up all related files.
⚠️ Important Notice ⚠️
Before performing any uninstallation steps, make sure to back up your important data. This includes your website project files (default location: /Applications/ServBay/www
), all database data (MySQL, PostgreSQL, MongoDB, etc., typically stored in /Applications/ServBay/db
), ServBay configuration files, and any SSL certificates you have managed via ServBay. The uninstall process will delete the ServBay installation directory and its entire contents. Any data not backed up will be lost.
Detailed Uninstallation Steps
Please follow the steps below to ensure that ServBay and all its components are completely removed.
Step 1: Close the ServBay Application
Before you begin uninstalling, make sure ServBay is fully closed. Right-click the ServBay icon in the Dock and select "Quit," or go to the ServBay app menu and choose "ServBay" > "Quit ServBay."
Step 2: Delete the ServBay Application File
First, remove the ServBay application itself from your system:
- Open Finder.
- In the Finder sidebar, click Applications.
- Locate
ServBay.app
in the applications list. - Drag the
ServBay.app
file to the Trash icon at the far right of the Dock. - Right-click the Trash icon and choose "Empty Trash" to permanently delete the application file.
Step 3: Delete the ServBay Installation Directory
ServBay's core files, packages, website files, and database data are all stored by default in the /Applications/ServBay
directory. Deleting this directory will remove all runtime files and your development data from ServBay.
🛑 One More Warning 🛑
Before performing this step, double-check that you have followed the "Important Notice" at the start of this guide. Make sure your website files in /Applications/ServBay/www
, database data in /Applications/ServBay/db
, ServBay configuration files, and SSL certificates—any important data—are all safely backed up. This action is irreversible; any deleted data cannot be recovered.
Open the Terminal application. You can find it by searching with Spotlight (Command + Space and type "Terminal") or via Finder under “Applications” > “Utilities” > “Terminal.”
In the terminal window, execute the following command to remove the ServBay installation directory and everything inside it:
bashsudo rm -rf /Applications/ServBay
1sudo
runs the following command with administrator privileges, as modifying the/Applications
directory typically requires elevated permissions. When you run this command, your system will prompt you to enter your password.rm
is used to remove files or directories.- The
-r
(recursive) flag deletes the specified directory and all its subdirectories and files. - The
-f
(force) flag forces the deletion and skips confirmation prompts. Please use the-f
flag with caution.
After executing this command, the
/Applications/ServBay
directory and all files and subfolders within it (including your websites, databases, ServBay configs, etc.) will be deleted.
Step 4: Uninstall the ServBay Helper Service
ServBay Helper is a privileged tool used to perform operations that require administrator rights (such as editing the hosts file or starting/stopping system services). For a thorough cleanup, you also need to remove this Helper service.
Run the following commands in Terminal:
sudo launchctl unload /Library/LaunchDaemons/Dev.ServBay.macOS.ServBay.Helper.plist
sudo rm /Library/LaunchDaemons/Dev.ServBay.macOS.ServBay.Helper.plist
sudo rm /Library/PrivilegedHelperTools/Dev.ServBay.macOS.ServBay.Helper
2
3
- The first command stops and unloads the ServBay Helper launch agent, so it won't start on system boot.
- The second command deletes the Helper service’s
.plist
configuration file, which tells the system how to launch the Helper. - The third command deletes the actual ServBay Helper executable.
Executing these commands requires administrator privileges, so you’ll be prompted for your user password.
Step 5: Clean Up Environment Variables
Open your ~/.zshrc
and ~/.bash_profile
files, find the following section, and remove it:
# BEGIN ServBay Environment Block
# ...
# END ServBay Environment Block
2
3
Conclusion
Following the above steps, you can completely remove the ServBay application, its installation directory, and the related Helper service from your macOS system. Once again, backing up your data is the most critical step before uninstalling. Be absolutely certain that your website files, database data, and other important configurations have been safely backed up before deleting the /Applications/ServBay
directory.