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, then check with ls -l DBNAME.sql that the file is there and not empty before you remove anything.

    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

    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.

    After quitting, search Activity Monitor for postgres. A process named postgres or postmaster means a server is still running. Also look for PostgresMenuHelper: in the recorded test the menu bar helper stayed running after Postgres.app had quit.

    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.

    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.
    • No output from launchctl list means the login helper is not loaded. A com.postgresapp.Postgres2LoginHelper line means it is still registered; turn it off in Login Items & Extensions.
    • 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 remove only the app:

    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. Application Support/Postgres is unticked by default, so unless you tick it, Mole leaves --zap out and removes the app and the rows you selected.

    What Mole lists

    When you remove Postgres.app with Mole:

    • ~/Library/Application Support/Postgres is listed but not selected, so your databases stay unless you tick it.
    • 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.

    Mac running low on space or slowing down? Mole can clean out the junk, remove apps completely and keep macOS in shape.

    Try Mole

    Mole · 鼴

    Cleanup, software, and status for your Mac.

    v1.16.0 (296) · 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.