Skip to main content
Mole
Features Tested apps Testimonials Pricing FAQ Blog
EnglishEN 简体中文中 繁體中文繁 日本語日 한국어한 FrançaisFR DeutschDE ItalianoIT EspañolES PortuguêsPT
Buy nowBuy Download

    Help, documentation, releases, and articles.

    Home/Apps tested with Mole

    How to uninstall Postgres.app on Mac

    Postgres.app runs PostgreSQL servers on your Mac, and each server keeps its databases in a data directory. By default those sit in ~/Library/Application Support/Postgres, one var-XX folder per PostgreSQL major version. Removing the app leaves them in place; deleting that folder deletes every database in it, so back up anything you need with pg_dump first. These steps cover Postgres.app downloaded from postgresapp.com and the Homebrew cask postgres-app. A PostgreSQL installed with a Homebrew formula, MacPorts or the EnterpriseDB installer is a separate installation and is not covered here.

    Back up your databases

    Postgres.app's documentation asks you to back up any data with pg_dump before uninstalling. The command-line tools ship inside the app, so run the backup while Postgres.app is still installed and the server holding the database is running. Replace DBNAME with the name of a database, in both places:

    /Applications/Postgres.app/Contents/Versions/latest/bin/pg_dump DBNAME > DBNAME.sql
    

    The dump file is written to the folder Terminal is currently in. Repeat for each database you want to keep, check that pg_dump finishes successfully without an error, and keep the dump outside the data directory you will delete. A nonempty file alone does not prove a complete backup. Before deleting the originals, restore each dump into a separate temporary database and check the needed tables and records. PostgreSQL’s backup documentation explains restoration and the separate role and tablespace backup needed when using per-database dumps.

    If you plan to reinstall Postgres.app, you can also leave the data directory where it is; the uninstall steps below treat deleting it as optional.

    Quit Postgres.app and remove it

    Before deleting any data directory, quit Postgres.app and search Activity Monitor for postgres, postmaster and PostgresMenuHelper. Check each process’s executable and data directory so a separate PostgreSQL installation is not stopped by mistake. Confirm the Postgres.app server using the directory you will remove has stopped; in the recorded test its menu bar helper stayed running after the main app quit.

    Postgres.app's install and uninstall page lists these steps:

    1. Quit Postgres.app, via its menu bar icon if one is shown, and drag it from Applications to the Trash.
    2. Optionally delete the data directories, by default in ~/Library/Application Support/Postgres. Do this only after the backup above, or when you are sure no database in it is needed.
    3. Optionally delete Postgres.app's preferences with defaults delete com.postgresapp.Postgres2.
    4. If you added the command-line tools to your $PATH, optionally remove that setting with sudo rm /etc/paths.d/postgresapp. Check first with the ls line in the next section; if the file is not there, skip this step.

    On first launch, Postgres.app registered a login helper, com.postgresapp.Postgres2LoginHelper, in the recorded test. It disappeared with the app. If a Postgres entry is still listed in System Settings › General › Login Items & Extensions, turn it off there.

    Where Postgres.app keeps its files

    Location What it holds What to do
    ~/Library/Application Support/Postgres Data directories, one var-XX folder per major version: your databases Back up first; delete only if you no longer need any database in it
    ~/Library/Preferences/com.postgresapp.Postgres2.plist App preferences Remove with the app
    ~/Library/Caches/com.postgresapp.Postgres2, ~/Library/Cookies/com.postgresapp.Postgres2.binarycookies Cache and cookies Remove with the app
    /etc/paths.d/postgresapp Adds the command-line tools to your $PATH, only if you set that up Remove it after the app is gone

    That is the default data location. If you pointed a server at another folder, its data is there instead. The data and $PATH locations come from Postgres.app's documentation, the cache and cookies from the Homebrew cask's zap list.

    For user-data paths in the table, open Finder and press Shift + Command + G to paste each full path separately. After the backup and server-stop checks, move unwanted Postgres.app data to the Trash.

    Check the result

    Run these read-only commands in Terminal:

    pgrep -il postgres
    launchctl list | grep -i postgresapp
    ls "$HOME/Library/Application Support/Postgres"
    ls -l /etc/paths.d/postgresapp
    
    • No output from pgrep means nothing named postgres is running. A listed postgres process means a server is still up, either from Postgres.app or from another PostgreSQL installation; a listed PostgresMenuHelper means the menu bar helper is still open. Quit them before deleting data.
    • The launchctl filter checks only current-user jobs whose names contain postgresapp. No match does not rule out another registration; check Postgres.app in Login Items & Extensions too. Identify a com.postgresapp.Postgres2LoginHelper match before turning it off there.
    • ls on the Postgres folder lists the var-XX data directories still there, which is expected if you kept your databases. "No such file or directory" means the folder is gone.
    • ls -l /etc/paths.d/postgresapp printing the file means the $PATH setting is still there. "No such file or directory" means it was never added or has been removed.

    If you installed it with Homebrew

    The postgres-app cask's uninstall step unloads the com.postgresapp.Postgres2LoginHelper login helper and quits Postgres.app and its menu bar helper. Its zap list includes ~/Library/Application Support/Postgres, which holds your databases, along with the cache, cookies and preferences. Running brew uninstall --cask --zap postgres-app yourself moves the data directories to the Trash, whatever you ticked in Mole. Homebrew Postgres.app cask

    To keep your databases, back them up first, or uninstall without zap:

    brew uninstall --cask postgres-app
    

    Mole adds --zap only when every path in the zap list sits inside your own ~/Library, touches no row you left unticked, and is not claimed by another installed app. With “Remove data and settings with apps” off, ~/Library/Application Support/Postgres stays unticked; turning it on can select this folder when it passes the app-data checks. If you want to keep the databases, uncheck it and verify the final list. An unchecked target prevents --zap.

    What Mole lists

    When you remove Postgres.app with Mole:

    • ~/Library/Application Support/Postgres is listed for review and stays unticked with “Remove data and settings with apps” off. Turning that setting on can select eligible app data, including this database directory; back up first or uncheck it to keep the databases.
    • The com.postgresapp.Postgres2 preferences file and the per-user temporary caches of the app and of its menu bar helper, com.postgresapp.Postgres2MenuHelper, are selected by default.
    • /etc/paths.d/postgresapp is not listed.
    • Launch jobs of a PostgreSQL you run through brew services are not listed or unloaded, even though their names also contain postgres.

    What this test covered

    On September 25, 2026, Postgres.app 2.9.6 was downloaded from the official release, whose checksum matched the Homebrew cask, copied into Applications, opened once without initializing a database, and removed with a development build of Mole with every listed row ticked. The 1.84 GB app, the empty ~/Library/Application Support/Postgres, the preferences file and a temporary cache went to the Trash, and the login helper was gone afterwards. A rescan then found the menu bar helper's temporary cache still on disk; Mole was changed the same day to list that helper's files, and a second uninstall removed it. No database was created, so the test does not show data being kept or removed. The $PATH setting and the Homebrew cask were not tested.

    If Mac apps leave files behind after uninstalling, try Mole. I've personally tested and inspected 799 Mac apps.

    Try Mole

    Mole · 鼴

    Cleanup, software, and status for your Mac.

    v1.16.0 (304) · Release notes

    Product

    Mac Cleaner App Uninstaller Mac Optimizer Disk Analyzer System Monitor

    Support

    Help Documentation Releases Blog

    Legal

    Terms of Service Privacy Policy Refund Policy

    Resources

    CLI Tool Affiliate Program

    Connect

    Twitter hi@mole.fit

    Mole’s only official website mole.fit · Avoid installers from unknown sources

    The CLI stays free for terminal workflows.