Asya Karapetyan
Content marketer, who specializes in Mac how-to guides
October 7, 2021
12 minutes to read

PostgreSQL is a powerful open source database system that leverages and extends the SQL language, combined with a host of features to securely store and scale the most complex data workloads. PostgreSQL has tons of various features designed to help developers build applications, administrators protect data integrity and create resilient environments, and help manage data regardless of dataset size.
removing PostgreSQL

PostgreSQL is not typically problematic, but if you are experiencing some issues with it, it is recommended to reinstall the application instead of trying to fix the problem. Thus, here we are going to explain how to uninstall PostgreSQL from a Mac computer easily and quickly.

If you do not have time to explore what macOS catalog system is, but you need to quickly uninstall PostgreSQL with all its system files and folders, switch to the automatic removal method and uninstall the app using App Cleaner & Uninstaller tool.

This is a special uninstaller that will help you to completely uninstall any application from Mac along with their caches, logs, login items, preferences and browsers extensions.


  1. How to remove PostgreSQL using Terminal.
  2. The easiest way to remove PostgreSQL from Mac.

How to remove PostgreSQL using Terminal

Deleting PostgreSQL just by dragging-and-dropping it into the Trash is not the correct way to uninstall apps. In this case, all the Postgre system service files will remain on your computer and keep cluttering up your disk space. Meaning, they will not let you correctly reinstall the app in the future.

To manage the complete Postgre uninstallation first of all, you should stop the 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, open Utilities subfolder, and launch Terminal. After that run the uninstaller using the following command:

open /Library/PostgreSQL/9.2/

Or try this one

sudo /Library/PostgreSQL/9.1/

If you get the message that this file does not exist, then skip to the second PostgreSQL removal way. 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. If for some reason this method does not work for you or you simply do not want to waste your time we recommend to uninstall PostgreSQL with the App Cleaner & Uninstaller tool, which will automatically find all support files of PostgreSQL and remove the application entirely. Keep reading this article to find out more about this tool.

The easiest way to remove PostgreSQL from Mac

Uninstalling PostgreSQL with Terminal may be a really time-consuming process. Moreover, you might have missed some service files and left them on your Mac’s hard drive. That’s why we recommend that you uninstall PostgreSQL automatically.

For the automatic uninstallation method, you need to use a special free cleanup application – App Cleaner & Uninstaller. This software automatically gathers all the service files of each app and allows you to uninstall them with one click. With this uninstaller, you can uninstall PostgreSQL without any extra steps and it will not take much of your time. 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 of the application window. 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 waste your time searching and removing them manually. That is why if you have already deleted PostgreSQL in a regular way, just by dragging-and-dropping it into the Trash, we recommend you to switch to the Remaining Files tab. That section will display all the leftovers of previously incorrectly deleted applications. So that is the perfect option to quickly get some free space.
Terminal window - uninstalling postgresQL command


In this article, we provided you with two ways of uninstalling PostgreSQL from Mac. You can uninstall it manually using the Terminal, which is a time-consuming task or you can follow the instruction of automatic uninstallation. Nektony recommends using a professional App Cleaner & Uninstaller tool. This application was developed specially for fast, safe, and complete uninstallation of any no longer needed application.

app cleaner icon

App Cleaner & Uninstaller

Uninstall any Mac application in 2 minutes.

Supported systems:
M1, macOS 10.10 +
Languages: flag icon
v. 7.4.3 Sep, 2021

Articles you may be interested in:

Scroll to Top