July 3, 2025

How to uninstall PostgreSQL on Mac

Asya Karapetyan
Written by
A content marketer with 10+ years of experience specializing in macOS, focused on creating guides for Mac cleanup and optimization.

Asya Karapetyan

Alex Holovchenko
Approved by
The content has been reviewed and approved by our team member, an Apple Certified Support Professional, who provides technical support to Nektony’s users.

Alex Holovchenko

Share

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.

Before we start

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 application using App Cleaner & Uninstaller tool. This is a special program that will help you to completely uninstall any application from Mac along with their caches, logs, login items, preferences and browser extensions.

Watch a short video how to uninstall PostgreSQL on Mac.

1:29

youtube button

What is PostgreSQL?

PostgreSQL is an open-source object-relational database system that supports both SQL (relational) and JSON (non-relational) querying. It’s widely used in web development, data analytics, geospatial applications, and high-availability enterprise systems.

With over 35 years of continuous development, PostgreSQL has stood the test of time. It was originally created at the University of California, Berkeley, and since then, a global community of developers has been improving and supporting it, making it one of the most trusted database systems in the world.

According to Stack Overflow Developer Survey — in 2023, over 45% of professional developers reported using it regularly. Today PostgreSQL has over 1 million active users and contributors across GitHub, mailing lists, and forums.

Should I remove PostgreSQL?

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. However, it can take up a lot of space – often over 100GB – due to stored databases, logs, and other files. Also, there are other reasons why you may need to uninstall PostgreSQL:

  • You’re not using it. PostgreSQL often gets installed automatically with certain apps or development tools.
  • You’re switching to an alternative database, for example, MySQL or SQLite.
  • You want a clean setup. Developers often remove PostgreSQL when cleaning or resetting their local development environment.

Important

Before starting the removal process, make sure to back up any important data stored in PostgreSQL before uninstalling it, and follow the uninstallation steps below to avoid any potential issues.

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 software in the future.

If you installed Postgres with its Installer, then you can use the Terminal command line to remove Postgres. Follow these steps:

  1. Quit PostgreSQL. For this, click on the Elephant icon in the toolbar and select Shutdown server.

    Shutdown server selected

  2. Open Terminal. You can find it in the Applications folder > Utilities.
  3. Run the uninstaller using the command below. Copy and paste it in the Terminal window and press Return:
    open /Library/PostgreSQL/9.2/uninstall-postgresql.app

    Copy

    If you get the message that this file does not exist, try this command:

    sudo /Library/PostgreSQL/9.1/uninstall-postgresql.app/Contents/MacOS/installbuilder.sh

    Copy

    Terminal window showing a command for uninstalling PostgreSQL
  4. Enter the administrator password if prompted.
    (Unfortunately, the root uninstaller doesn’t delete all PostgreSQL files, so you will need to remove them manually. For this, use the commands below.)
  5. Remove the ini file using this command:
    sudo rm /etc/postgres-reg.ini

    Copy

  6. Remove the PostgreSQL folder from the system Library:
    sudo rm -rf /Library/PostgreSQL

    Copy

  7. Remove the PostgreSQL user account. For this, go to System Settings → Users & Groups → select the PostgreSQL and click to delete it.
  8. Restore your shared memory settings using this command: 
    sudo rm /etc/sysctl.conf

    Copy

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. Keep reading this article to find out more about this method.

The easiest way to remove PostgreSQL from Mac

For this method, you need to use a special tool – App Cleaner & Uninstaller. This software automatically gathers all the service files of each application and allows you to uninstall them with a few clicks. Here’s how to use it:

  1. Download App Cleaner & Uninstaller and launch it.
  2. It will start scanning your Applications folder and show you the list of all installed apps on your Mac.
  3. Locate and select the PostgreSQL.
  4. If you switch on the Expert mode, you’ll see all the PostgreSQL client support files, like caches, preferences, etc. 
  5. Click the Remove button.
  6. Confirm the removal. Terminal window - uninstalling postgresQL command

Note that the app 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 using the first method, you can find its remaining files with the uninstaller. For this, witch to the Remaining Files tab. That section will display all the leftovers of previously incorrectly deleted applications.

App Cleaner & Uninstaller window showing postgreSQL

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.

Frequently asked questions

Where is Postgres installed by default on Mac?

Postgres is typically installed in the following directory on Mac:

/usr/local/pgsql

Copy

If you can't find it there, use the following command in the Terminal to find out where Postgres is installed on your Mac:

brew info postgres

Copy

This will show you more information about the Postgres package installed by Homebrew, including the location of the data directory and the configuration files.

How do I know if PostgreSQL is running on my Mac?

To check PostgreSQL running processes, use the following command in Terminal:

ps auxwww | grep postgres

Copy

 

How do I update Postgres on my Mac?

Follow these steps to update PostgreSQL on macOS:

  1. Uninstall the hold version of Postgres using the guide above.
  2. Download the new version of Postgres.app and double-click the downloaded .dmg.
  3. Follow the on-screen instruction to install the app.

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top