Uninstalling PostgreSQL
The PostgreSQL installer creates an uninstaller in the PostgreSQL installation directory. You can uninstall PostgreSQL on Windows and Mac hosts.
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
On the Windows Control Panel, open the Uninstall or change a program dialog box.

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

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.

A progress bar keeps you informed as PostgreSQL is removed.

When the uninstaller completes, select OK.

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:
Assume the identity of an operating system superuser, and navigate into the folder where the uninstaller resides:
Where version is the version of PostgreSQL you installed.
Invoke the uninstaller:
If prompted, provide a password that allows the uninstaller to make changes to your system.
The uninstaller opens and asks if you want to uninstall the entire application or individual components.
How To Completely Uninstall PostgreSQL
If you’re using PostgreSQL, you may need to remove the package from your system at some point. It’s important to know how to uninstall PostgreSQL properly to make sure all components of the package are completely removed and you don’t encounter any errors. In this article, we’ll explain how to uninstall PostgreSQL from Linux, macOS and Windows operating systems.
NOTE: Be sure to elevate the privileges for any of the commands in this article with sudo if the terminal returns a Permission denied error.
Uninstall and remove PostgreSQL on Debian Linux
You can use the apt-get command to completely remove PostgreSQL on a Debian-based distribution of Linux such as Linux Mint or Ubuntu:
Grep for all PostgreSQL packages in Debian Linux
You can use the dpkg command for managing Debian packages, in conjunction with grep , to search for all the package names installed that contain the sub-string postgres . An example of this command is shown below:
Finally, make sure to use the APT-GET repository’s —purge remove command, followed by the postgres package name. This command will remove the package and purge all the data associated with it:
Remove all of the PostgreSQL data and directories
Use the rm command with the -rf options to recursively remove all of the directories and data for the postgresql packages:

After you complete your rm commands, execute the dpkg -l | grep postgres command one more time to verify that all of the packages have been removed.
Uninstall and remove PostgreSQL packages on Fedora Linux
You can use the YUM repository’s yum command to uninstall PostgreSQL on Fedora-based distributions of Linux such Red Hat or CentOS:
To use a wildcard operator ( * ) to remove all packages with names beginning with postgres , use the following command:
Be sure to remove the pgsql directory as well:
NOTE: Keep in mind that sudo is not enabled for RHEL users by default. Instead, use the su (switch user) command to enter as root and execute the above commands with elevated privileges if necessary.
Grep for the PostgreSQL packages in Fedora using ‘rpm’
You can use the rpm command with the -qa options to grep for any packages that contain “postgres” in their name:
If you prefer, you can shorten the search to something like post as well:

You can also use grep in conjunction with YUM’s list command to return a list of all package instances of PostgreSQL:
Uninstall the PostgreSQL package using YUM remove
Once you’ve located the package, use YUM’s remove command to uninstall PostgreSQL from your Linux system:
Navigate to the assigned directory for the PostgreSQL data, and then use the rm command to delete all of your databases and tables.
Uninstall and remove PostgreSQL from Windows
If you’re using Windows, type uninstall or remove into the search bar at the bottom left-hand side of the screen:

Then, follow the steps for the removal process, making sure to select the “Entire Components option when prompted.
You’ll see a pop-up stating something like: The data directory s(C:\Program Files\PostgreSQL\11\data) has not been removed . Simply click “OK” to close the pop-up window, and do not select the option to restart your PC.
Delete the data folder for PostgreSQL in Windows
After you’ve completed the removal process described in the previous section, open File Explorer for Windows and navigate to the data folder. Right-click the data folder and click the Delete button. Be sure to empty the recycle bin afterwards to ensure that any sensitive data has been properly deleted.

After all of the data has been deleted, you should restart Windows 10.
Uninstall and remove PostgreSQL on macOS
To uninstall PostgreSQL on macOS, open a new instance of Finder and navigate to the Applications directory. Look for the PostgreSQL folder and drag its contents to the Trash application folder in macOS.

Remove the PostgreSQL data in a terminal in macOS
After you’ve removed the PostgreSQL folder, open the Utilities folder in a Finder window, and then open the Terminal application.

Use the cd command to navigate to the PostgreSQL directory. You can do this by typing the directory path into the terminal prompt and pressing Return:
Then, use the rm -rf command to remove the directory and its contents:
Don’t forget to empty the Trash application’s contents when you are finished.
Uninstall the Homebrew installation of PostgreSQL on macOS
You can use the brew command in a macOS terminal window to remove the Homebrew version of PostgreSQL. First, use the list command to return all of the applications installed using Homebrew:
Then, use the following command to force the removal the Homebrew installation of postgresql :
Conclusion
If you find yourself needing to uninstall PostgreSQL, it’s important to do a careful and thorough job. Taking shortcuts when it comes to the removal process can leave sensitive data remaining on your machine. In this article, we explained how to uninstall and remove PostgreSQL from Windows, Linux and macOS. With the step-by-step instructions detailed in this tutorial, you’ll be ready to remove PostgreSQL from any of your own machines.
Pilot the ObjectRocket Platform Free!
Try Fully-Managed CockroachDB, Elasticsearch, MongoDB, PostgreSQL (Beta) or Redis.
Как полностью удалить postgresql windows 10
Как удалить сервер PostgreSQL с Windows 10?
Как подключиться к PostgreSQL на windows x64?
Всем привет! На x32 windows подключается без проблем. Для x64 скачал libpq.dll по ссылке из доков.
| Меню пользователя @ Akelo |
| Меню пользователя gecata |
Как удалить Windows 7 и вернуть нормально загрузку Windows Vista 86
Поставил 7 второй системой — работало всё нормально. Понадобилось её удалить — удалил согласно.
Как удалить PostgreSQL

Uninstalling PostgreSQL
The PostgreSQL installer creates an uninstaller in the PostgreSQL installation directory. This section walks you through uninstalling PostgreSQL on a Windows as well as a Mac host.
Uninstalling PostgreSQL on Windows
To uninstall PostgreSQL, navigate to the Windows Control Panel to open the Uninstall or change a program dialog and Right-click the PostgreSQL 13 and select Uninstall/Change from the context menu.

Fig. 1: The Uninstall or change a program dialog
You can either remove the entire application or individual components.
- If you wish to remove the entire application, select the Entire application option and click Next to start uninstalling components.
- If you wish to remove individual components, select the Individual components option and click Next , a selection screen opens, allowing you to select which components you wish to uninstall. Select the components you wish to uninstall, and click Next to start uninstalling components.

Fig. 2: Confirm that you wish to uninstall PostgreSQL
Select the components you want to uninstall. Click Next when you are ready to continue.

Fig. 3: Select the components to uninstall s A progress bar will keep you informed as PostgreSQL is removed.

Fig. 4: Uninstalling PostgreSQL
When the uninstaller completes, click OK to exit.

Fig. 5: An Info dialog confirms the uninstallation
Uninstalling PostgreSQL on Mac
To uninstall PostgreSQL on a Mac system, assume the identity of an operating system superuser, and navigate into the folder in which the uninstaller resides:
Then, invoke the uninstaller with the command:
If prompted, provide a password that allows the uninstaller to make changes to your system. The uninstaller will open, asking you if you wish to uninstall the entire application or individual components.
To remove the entire application, select the Entire application option and click Next to start uninstalling components.
To remove individual components, select the Individual components option, a selection screen opens allowing you to select which components you wish to uninstall.

Fig. 6: Remove the entire application or components
Select the components you wish to uninstall, and click Next to start uninstalling components.

Fig. 7: Selecting the components to uninstall
Progress bars are displayed as each component is removed. When the uninstaller completes, click OK to exit the uninstaller.
How To Completely Uninstall PostgreSQL
If you’re using PostgreSQL, you may need to remove the package from your system at some point. It’s important to know how to uninstall PostgreSQL properly to make sure all components of the package are completely removed and you don’t encounter any errors. In this article, we’ll explain how to uninstall PostgreSQL from Linux, macOS and Windows operating systems.
NOTE: Be sure to elevate the privileges for any of the commands in this article with sudo if the terminal returns a Permission denied error.
Uninstall and remove PostgreSQL on Debian Linux
You can use the apt-get command to completely remove PostgreSQL on a Debian-based distribution of Linux such as Linux Mint or Ubuntu:
Grep for all PostgreSQL packages in Debian Linux
You can use the dpkg command for managing Debian packages, in conjunction with grep , to search for all the package names installed that contain the sub-string postgres . An example of this command is shown below:
Finally, make sure to use the APT-GET repository’s —purge remove command, followed by the postgres package name. This command will remove the package and purge all the data associated with it:
Remove all of the PostgreSQL data and directories
Use the rm command with the -rf options to recursively remove all of the directories and data for the postgresql packages:

After you complete your rm commands, execute the dpkg -l | grep postgres command one more time to verify that all of the packages have been removed.
Uninstall and remove PostgreSQL packages on Fedora Linux
You can use the YUM repository’s yum command to uninstall PostgreSQL on Fedora-based distributions of Linux such Red Hat or CentOS:
To use a wildcard operator ( * ) to remove all packages with names beginning with postgres , use the following command:
Be sure to remove the pgsql directory as well:
NOTE: Keep in mind that sudo is not enabled for RHEL users by default. Instead, use the su (switch user) command to enter as root and execute the above commands with elevated privileges if necessary.
Grep for the PostgreSQL packages in Fedora using ‘rpm’
You can use the rpm command with the -qa options to grep for any packages that contain “postgres” in their name:
If you prefer, you can shorten the search to something like post as well:

You can also use grep in conjunction with YUM’s list command to return a list of all package instances of PostgreSQL:
Uninstall the PostgreSQL package using YUM remove
Once you’ve located the package, use YUM’s remove command to uninstall PostgreSQL from your Linux system:
Navigate to the assigned directory for the PostgreSQL data, and then use the rm command to delete all of your databases and tables.
Uninstall and remove PostgreSQL from Windows
If you’re using Windows, type uninstall or remove into the search bar at the bottom left-hand side of the screen:

Then, follow the steps for the removal process, making sure to select the “Entire Components option when prompted.
You’ll see a pop-up stating something like: The data directory s(C:\Program Files\PostgreSQL\11\data) has not been removed . Simply click “OK” to close the pop-up window, and do not select the option to restart your PC.
Delete the data folder for PostgreSQL in Windows
After you’ve completed the removal process described in the previous section, open File Explorer for Windows and navigate to the data folder. Right-click the data folder and click the Delete button. Be sure to empty the recycle bin afterwards to ensure that any sensitive data has been properly deleted.

After all of the data has been deleted, you should restart Windows 10.
Uninstall and remove PostgreSQL on macOS
To uninstall PostgreSQL on macOS, open a new instance of Finder and navigate to the Applications directory. Look for the PostgreSQL folder and drag its contents to the Trash application folder in macOS.

Remove the PostgreSQL data in a terminal in macOS
After you’ve removed the PostgreSQL folder, open the Utilities folder in a Finder window, and then open the Terminal application.

Use the cd command to navigate to the PostgreSQL directory. You can do this by typing the directory path into the terminal prompt and pressing Return:
Then, use the rm -rf command to remove the directory and its contents:
Don’t forget to empty the Trash application’s contents when you are finished.
Uninstall the Homebrew installation of PostgreSQL on macOS
You can use the brew command in a macOS terminal window to remove the Homebrew version of PostgreSQL. First, use the list command to return all of the applications installed using Homebrew:
Then, use the following command to force the removal the Homebrew installation of postgresql :
Conclusion
If you find yourself needing to uninstall PostgreSQL, it’s important to do a careful and thorough job. Taking shortcuts when it comes to the removal process can leave sensitive data remaining on your machine. In this article, we explained how to uninstall and remove PostgreSQL from Windows, Linux and macOS. With the step-by-step instructions detailed in this tutorial, you’ll be ready to remove PostgreSQL from any of your own machines.
Pilot the ObjectRocket Platform Free!
Try Fully-Managed CockroachDB, Elasticsearch, MongoDB, PostgreSQL (Beta) or Redis.
Как полностью удалить postgresql windows 10
«net user postgres /del»
Как удалить PostgreSQL

Uninstalling PostgreSQL
The PostgreSQL installer creates an uninstaller in the PostgreSQL installation directory. This section walks you through uninstalling PostgreSQL on a Windows as well as a Mac host.
Uninstalling PostgreSQL on Windows
To uninstall PostgreSQL, navigate to the Windows Control Panel to open the Uninstall or change a program dialog and Right-click the PostgreSQL 13 and select Uninstall/Change from the context menu.

Fig. 1: The Uninstall or change a program dialog
You can either remove the entire application or individual components.
- If you wish to remove the entire application, select the Entire application option and click Next to start uninstalling components.
- If you wish to remove individual components, select the Individual components option and click Next , a selection screen opens, allowing you to select which components you wish to uninstall. Select the components you wish to uninstall, and click Next to start uninstalling components.

Fig. 2: Confirm that you wish to uninstall PostgreSQL
Select the components you want to uninstall. Click Next when you are ready to continue.

Fig. 3: Select the components to uninstall s A progress bar will keep you informed as PostgreSQL is removed.

Fig. 4: Uninstalling PostgreSQL
When the uninstaller completes, click OK to exit.

Fig. 5: An Info dialog confirms the uninstallation
Uninstalling PostgreSQL on Mac
To uninstall PostgreSQL on a Mac system, assume the identity of an operating system superuser, and navigate into the folder in which the uninstaller resides:
Then, invoke the uninstaller with the command:
If prompted, provide a password that allows the uninstaller to make changes to your system. The uninstaller will open, asking you if you wish to uninstall the entire application or individual components.
To remove the entire application, select the Entire application option and click Next to start uninstalling components.
To remove individual components, select the Individual components option, a selection screen opens allowing you to select which components you wish to uninstall.

Fig. 6: Remove the entire application or components
Select the components you wish to uninstall, and click Next to start uninstalling components.

Fig. 7: Selecting the components to uninstall
Progress bars are displayed as each component is removed. When the uninstaller completes, click OK to exit the uninstaller.