How to uninstall PostgreSQL on Mac

April 15, 2025
Asya Karapetyan
Written by
Asya Karapetyan
info
A content marketer with 10+ years of experience specializing in macOS, focused on creating guides for Mac cleanup and optimization.
A content marketer with 10+ years of experience specializing in macOS, focused on creating guides for Mac cleanup and optimization.
Alex Holovchenko
Approved by
Alex Holovchenko
info
The content has been reviewed and approved by our team member, an Apple Certified Support Professional, who provides technical support to Nektony’s users.
The content has been reviewed and approved by our team member, an Apple Certified Support Professional, who provides technical support to Nektony’s users.

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.

Contents:

  1. What is PostgreSQL?
  2. Should I remove PostgreSQL?
  3. How to remove PostgreSQL using Terminal
  4. The easiest way to remove PostgreSQL from Mac
  5. FAQs

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.
“App

App Cleaner & Uninstaller

Free Download


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.
  2. drop menu - Shutdown server selected
  3. Open Terminal. You can find it in the Applications folder > Utilities.
  4. Run the uninstaller using the command below. Copy and paste it in the Terminal window and press Return:
  5. open /Library/PostgreSQL/9.2/uninstall-postgresql.app

    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

    Terminal window showing a command for uninstalling PostgreSQL
  6. Enter the administrator password if prompted.
  7. (Unfortunately, the root uninstaller doesn’t delete all PostgreSQL files, so you will need to remove them manually. For this, use the commands below.)

  8. Remove the ini file using this command:

    sudo rm /etc/postgres-reg.ini

  9. Remove the PostgreSQL folder from the system Library:

    sudo rm -rf /Library/PostgreSQL

  10. Remove the PostgreSQL user account. For this, go to System Settings → Users & Groups → select the PostgreSQL and click to delete it.
  11. Restore your shared memory settings using this command: 

    sudo rm /etc/sysctl.conf

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.
  7. App Cleaner & Uninstaller window showing postgreSQL
Watch a short video how to uninstall PostgreSQL on Mac.

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.

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.

FAQs

Where is Postgres installed by default on Mac?

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

How do I update Postgres on my Mac?

Leave a Comment

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

Scroll to Top