Uninstalling PostgreSQL

The PostgreSQL installer creates an uninstaller in the PostgreSQL installation directory. You can uninstall PostgreSQL on Windows and Mac hosts.

Note

If you used Stack Builder to install any applications that work with PostgreSQL, you must uninstall each application. Use the uninstall program created for that application during the install process.

Uninstalling PostgreSQL on Windows

  1. On the Windows Control Panel, open the Uninstall or Change a Program dialog box.

    The Uninstall or Change a Program dialog box

  2. Right-click PostgreSQL, and select Uninstall/Change from the context menu.

    Confirm that you want to uninstall PostgreSQL

  3. You can remove the entire application or individual components.

    • To remove the entire application, select Entire application and select Next.

    • To remove individual components, select Individual components and select Next. Then, from the list, select the components to uninstall, and select Next.

      Select the components to uninstall

    A progress bar keeps you informed as PostgreSQL is removed.

    Uninstalling PostgreSQL

  4. When the uninstaller completes, select OK.

    An Info dialog box confirms the uninstallation

Uninstalling PostgreSQL on Mac

These instructions apply if you used EDB's interactive Mac installer to install PostgreSQL.

  • If you used another installer, refer to the macOS documentation for instructions on uninstalling an app.

  • If you used Homebrew, use the brew uninstall command to uninstall PostgreSQL and any related packages. Use brew list to see what's installed.

To uninstall PostgreSQL on a Mac system:

Data is not deleted

This uninstaller removes the application but, to avoid data loss, leaves in place the Postgres data directory and the postgres user that was created to manage the installation. At the end of its run, the uninstaller displays a message confirming that it didn't remove the data directory or user.

  1. Invoke the uninstaller:

    open /Library/PostgreSQL/<version>/uninstall-postgresql.app

    Where <version> is the version of PostgreSQL you installed.

  2. You're prompted for a password. If your user has admin rights on macOS, enter your password. Otherwise, enter the user name and password of a user with admin rights.

    The uninstaller opens and asks if you want to uninstall the entire application or individual components.

    Remove the entire application or components

  3. Respond to the installer:

    • To remove the entire application, select Entire application, and select Next.
    • To remove individual components, select Individual components. Select the components to uninstall, and select Next to start uninstalling components.

    Selecting the components to uninstall

    Progress bars appear as each component is removed.

  4. When the uninstaller completes, select OK.

    The Uninstallation is completed


Could this page be better? Report a problem or suggest an addition!