postgresql logo

PostgreSQL is not typically problematic, but if you get some issues with it, it is recommended to reinstall the program instead of trying to fix the problem. So in this article, we are going to explain how to uninstall PostgreSQL on a Mac easily and quickly.


  1. How to remove PostgreSQL using Terminal.
  2. How to remove PostgreSQL using App Cleaner.

How to remove PostgreSQL using terminal

First, you should stop Postgres server on your Mac. For this, click on the Elephant icon in the toolbar and select Shutdown server.

drop menu - Shutdown server selected

If you installed Postgres with its Installer, then you can use the Terminal command line to remove Postgres. For this, go to the Applications folder →Utilities → open Terminal → and run the uninstaller using the following command:

open /Library/PostgreSQL/9.2/

Or try this one

sudo /Library/PostgreSQL/9.1/

If you encounter the message that this file does not exist, then skip to Method 2 of PostgreSQL removal. If the command runs the uninstaller, proceed to the next steps.

Terminal window - uninstalling postgresQL command

Enter the administrator password to launch the uninstaller. Then follow the provided steps to remove the PostgreSQL and data folders.

Unfortunately, the root uninstaller doesn’t delete all service files of the program, so you will need to remove them manually. For this, use the commands below:

  1. Remove the ini file:
    sudo rm /etc/postgres-reg.ini
  2. Remove the PostgreSQL folder from the system Library:
    sudo rm -rf /Library/PostgreSQL
  3. Remove the PostgreSQL user. Go to System Preferences → Users & Groups → click the Lock icon and enter the administrator password to unlock settings → select the PostgreSQL and click the “-” icon.  System Preferences window - users and groups - PostgreSQL user name
  4. Restore your shared memory settings using this command: sudo rm /etc/sysctl.conf

That’s all with the first method of removal. Now, let’s learn the second method, which you will most likely find easier and more convenient.

How to remove PostgreSQL using
App Cleaner & Uninstaller

App Cleaner & Uninstaller is a removal tool for any kind of program on Mac. With this uninstaller, you can uninstall PostgreSQL well. Here are a few steps to do that:

  1. Download App Cleaner & Uninstaller and launch it.
  2. Confirm access to your Applications folder and it will start scanning it to find the installed apps on your Mac. Then you will see a list of apps in the left section. Find and select the PostgreSQL folder. In the right section, you can preview all executable files, support files, cache and all types of file related to PostgreSQL. App Cleaner & Uninstaller window  - removing postgreSQL
  3. Click the Remove button and confirm the removal of the selected files. App Cleaner & Uninstaller window - confirmation to uninstall postgreSQL

Note that App Cleaner & Uninstaller automatically detects all the support files of the apps, so you don’t need to search for and remove them manually. If you already deleted PostgreSQL in the regular way, you can find the leftovers of the program in the Remaining Files tab.

Terminal window - uninstalling postgresQL command
That’s all. As we promised, easy and fast!

Articles you may be interested in: