How to uninstall PostgreSQL on Mac
PostgreSQL is a powerful open source database system that leverages and extends the SQL language, combined with a host of features to securely store and scale the most complex data workloads. 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.

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.
- How to remove PostgreSQL using Terminal.
- The easiest way to remove PostgreSQL from Mac.
#1 Tip: A quick way to completely uninstall PostgreSQL on Mac
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 progra that will help you to completely uninstall any application from Mac along with their caches, logs, login items, preferences and browser extensions.
App Cleaner & Uninstaller
Before we start, watch a short video how to uninstall PostgreSQL on Mac.
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.
Before you uninstall Postgres, you should stop the PostgreSQL server on your Mac. For this, click on the Elephant icon in the toolbar and select Shutdown server

If you installed Postgres with its Installer, then you can use the Terminal command line to remove Postgres. For this, go to the Applications folder, open Utilities subfolder, and launch Terminal. After that run the uninstaller using the following command:
Or try this one

If you get the message that this file does not exist, then skip to the second PostgreSQL removal way. If the command runs the uninstaller, proceed to the next steps.
Enter the administrator password to launch the uninstaller. Then follow the provided steps to remove the PostgreSQL and data folders.
Unfortunately, the root uninstaller doesn’t delete all PostgreSQL files, so you will need to remove them manually. For this, use the commands below:

- Remove the ini file:
sudo rm /etc/postgres-reg.ini - Remove the PostgreSQL folder from the system Library:
sudo rm -rf /Library/PostgreSQL - Remove the PostgreSQL user account. Go to System Preferences → Users & Groups → click the Lock icon and enter the administrator password to unlock settings → select the PostgreSQL and click the “-” icon.
- Restore your shared memory settings using this command: sudo rm /etc/sysctl.conf
That’s all with the first method of removal. If for some reason this method does not work for you or you simply do not want to waste your time we recommend to completely uninstall PostgreSQL with the App Cleaner & Uninstaller tool, which will automatically find all support files of PostgreSQL and remove the application entirely. Keep reading this article to find out more about this tool.
The easiest way to remove PostgreSQL from Mac
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.
For the automatic uninstallation method, you need to use a special free cleanup application – App Cleaner & Uninstaller. This software automatically gathers all the service files of each application and allows you to uninstall them with one click. With this software tool, you can uninstall PostgreSQL without any extra steps and it will not take much of your time. Here are a few steps to do that:
- Download App Cleaner & Uninstaller and launch it.
- It will start scanning your Applications folder and show you the list of all installed apps on your Mac.
- Locate and select the PostgreSQL.
- If you switch on the Expert mode, you’ll see all the PostgreSQL client support files, like caches, preferences, etc.
- Click the Remove button and confirm the removal of PostgreSQL on a 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 in a regular way, just by dragging-and-dropping it into the Trash, we recommend you to switch to the Remaining Files tab. That section will display all the leftovers of previously incorrectly deleted applications. So that is the perfect option to quickly get some free space.
Conclusion
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.
App Cleaner & Uninstaller Uninstall any Mac application in 2 minutes
Update v. 8.2.6 January 19, 2024
Как полностью удалить PostgreSQL на Mac [новое обновление]

Всемогущий эксперт по написанию текстов, который хорошо разбирается в проблемах Mac и предоставляет эффективные решения.
Программирование и базы данных могут быть сложной задачей для многих людей. Но для программистов это всегда часть работы. Если вы редко пользуетесь приложением, возможно, вы захотите удалите его с вашего Mac. К удалить PostgreSQL Mac не так-то просто, если делать это вручную. И переустановить его снова — задача не из легких.
К счастью, мы здесь, чтобы помочь вам. Мы говорим о PostgreSQL здесь. Это очень мощное приложение, которое используется для баз данных. Он действует как расширение вашего обычного языка SQL.
Но если вам нужно удалить Postgres на Mac, мы научим вас, как это сделать. Вы можете установить его снова или полностью удалить со своего компьютера. Ознакомьтесь с нашим руководством ниже.
Часть 1. Быстрое и полное удаление PostgreSQL на Mac
Теперь мы начнем с простой части. Мы научим вас, как быстро удалить Postgres на Mac с помощью мощного инструмента под названием iMyMac PowerMyMac.
По сути, это программное обеспечение является оптимизатором для Mac. Одним из его мини-инструментов является то, что вы называете Деинсталлятор приложений. Этот инструмент удаления приложений можно использовать для простого удаления всех типов приложений с вашего компьютера Mac. Это включает удаление связанных с ним файлов трассировки.
Вот шаги, которые вы должны выполнить, чтобы легко удалить Postgres с помощью PowerMyMac:
- Схватить, установить, запустить. Первое, что вам нужно сделать, это загрузить PowerMyMac инструмент на своем веб-сайте. Используйте свой Mac, чтобы установить его на устройство. Затем вы, наконец, можете запустить инструмент, чтобы начать удаление.
- Нажмите Деинсталлятор приложений Следующим шагом является щелчок по модулю с надписью «Деинсталлятор». Его можно найти в левой части интерфейса PowerMyMac.
- Нажмите SCAN. Нажмите кнопку «Сканировать», чтобы найти все установленные приложения на вашем компьютере Mac. Подождите, пока появится список, и выберите соответствующее приложение для удаления.
- Нажмите ЧИСТКА. Следующим шагом является нажатие кнопки «Очистить».
- Ждите подтверждения. Подождите, пока PowerMyMac не подтвердит, что процесс удаления завершен.

Часть 2. Как удалить PostgreSQL без стороннего программного обеспечения?
Итак, как удалить Postgres на свой компьютер без использования стороннего программного обеспечения? Мы научим вас здесь. Ручной способ удаления PostgreSQL не рекомендуется, потому что вы можете удалить важные системные файлы, имеющие решающее значение для работы вашего компьютера Mac. Тем не менее, мы научим вас, как удалить Postgres на Mac, используя ручной метод ниже.

Как удалить PostgreSQL с Mac с помощью терминала?
Чтобы полностью удалить Postgres на Mac, удаления приложения недостаточно. К нему прилагается множество связанных файлов, которые вам также необходимо удалить. Они занимают много места на вашем компьютере. Итак, ниже приведены шаги по удалению его вручную через Терминал:
- Сначала вам следует выйти из сервера PostgreSQL на вашем Mac. Нажмите значок в виде слона. Это будет на панели инструментов вашего Mac. Нажмите на опцию, которая говорит Завершение работы сервера.
- Откройте Приложения >Утилиты >Терминал.
- Введите команду в Терминале:
open /Library/PostgreSQL/9.2/uninstall-postgresql.app
Если эта команда не работает, вы можете использовать эту команду:
sudo /Library/PostgreSQL/9.1/uninstall-postgresql,app/Contents/MAacOs/installbuilder.sh - Введите пароль администратора вашего Mac, чтобы открыть программу удаления. Дождитесь завершения первой части процесса удаления.
- После этого вы следует удалить файл INI с вашего Mac. Для этого введите следующее:
sudo rm /etc/postgres-reg.ini - Тогда вам следует удалить папку PostgreSQL в библиотеке. Для этого введите команду:
sudo rm –rf /Library/PostgreSQL - После этого вы должны удалить пользователя PostgreSQL. Посетите Системные настройки вашего Mac, затем перейдите к Пользователи и группы. После этого нажмите значок в виде замка и введите пароль администратора для разблокировки. Затем выберите PostgreSQL. Затем, нажмите значок минус (-).
- После этого снова откройте Терминал, чтобы продолжить удаление Postgres. Используйте команду:
sudo rm /etc/sysctl.conf

Итак, вот как удалить Postgres на Mac с помощью Терминала. Это может быть очень сложно, поэтому мы рекомендуем вместо этого использовать PowerMyMac. Второй инструмент — это более простой способ удалить Postgres.
Вы также можете использовать Homebrew для удаления PostgreSQL:
$ brew remove postgresql
Как вручную удалить PostgreSQL на Mac?
Вот как вручную удалить Postgres с Mac. Ознакомьтесь с нашими шагами ниже:
- Перейдите на Мониторинг системы и выйдите из всех приложений, связанных с PostgreSQL. После этого переместите приложение PostgreSQL в корзину.
- Посетите Finder, затем перейдите в Go. После этого визита Перейти в папку и введите следующее: ~/Library/Application/Support/PostgreSQL/ .
- Найдите все связанные файлы и папки PostgreSQL. Обычно их можно найти в папках с именами WebKit, Application State, Saved, Preferences, Logs, Frameworks, Containers, Caches, Application Support , и т.д.
- Очистите корзину Mac. После этого перезагрузите компьютер, чтобы завершить удаление.

Часть 3. Вывод
Это руководство научило вас, как удалить Postgres на Mac без труда. Мы дали ручные способы, как это сделать. Одним из ручных, но сложных способов является Терминал. Еще один сложный способ — удалять файлы трассировки один за другим.
Эти ручные способы не рекомендуются, потому что вы можете легко удалить файлы, важные для работы вашей системы. Таким образом, мы рекомендуем вам использовать PowerMyMac сделать это.
Это отличный способ оптимизировать ваш Mac. Кроме того, у него есть деинсталлятор, который поможет вам удалить приложения с Mac. Проверьте инструмент сегодня!
Рейтинг: 4.5 / 5 (на основе 86 рейтинги)
Как полностью удалить Posgresql с Mac?
Прошелся по разным вариантам, от начала до конца выполнил указания отсюда.
Команда psql тем не менее живет, и выдает
psql: could not connect to server: No such file or directory
Is the server running locally and accepting
connections on Unix domain socket «/var/pgsql_socket/.s.PGSQL.5432»?
override rwxr-xr-x root/wheel compressed for /usr/bin/psql?
Это уже вне моей компетенции, и я честно не знаю что оно делает
- Вопрос задан более трёх лет назад
- 8400 просмотров
Completely uninstall PostgreSQL 9.0.4 from Mac OSX Lion?
This question may look like a duplicate of: How to uninstall postgresql on my Mac (running Snow Leopard) however, there are two major differences. I’m running Lion and I’m trying to uninstall PostgreSQL 9.0.4. I’ve looked at the last question and the link that it referenced, but I did not find a file called «uninstall-postgresql» when I run this command:
sudo find / -name "*uninstall-*"
So, I assume this means that the uninstall process for 9.0.4 is different than that of 8.x. I’ve seen a couple of posts in different places describing a method for manual uninstallation but, similarly, some of the directories/files referenced are not present on my machine. Any assistance or direction you can provide would be greatly appreciated. Just for reference, this is the link the other poster used to uninstall postgres from snow leopard. As I tried to step through these commands, most of them choked with some variant of «command not found». UPDATE: In addition to brew uninstall postgres , should I remove any of the following files/directories manually? Keep in mind I want to completely wipe the slate clean, no data files/database tables or anything.
> sudo find / -name "*postgres*" find: /dev/fd/3: Not a directory find: /dev/fd/4: Not a directory /Library/Ruby/Gems/1.8/doc/activerecord-3.1.1/rdoc/lib/active_record/connection_adapters/postgresql_adapter_rb.html /Library/Ruby/Gems/1.8/doc/activerecord-3.1.1/ri/ActiveRecord/ConnectionAdapters/PostgreSQLAdapter/postgresql_version-i.ri /Library/Ruby/Gems/1.8/doc/arel-2.2.1/rdoc/lib/arel/visitors/postgresql_rb.html /Library/Ruby/Gems/1.8/gems/activerecord-3.1.1/lib/active_record/connection_adapters/postgresql_adapter.rb /Library/Ruby/Gems/1.8/gems/arel-2.2.1/lib/arel/visitors/postgresql.rb /Library/Ruby/Gems/1.8/gems/arel-2.2.1/test/visitors/test_postgres.rb /Library/Ruby/Gems/1.8/gems/railties-3.1.1/lib/rails/generators/rails/app/templates/config/databases/jdbcpostgresql.yml /Library/Ruby/Gems/1.8/gems/railties-3.1.1/lib/rails/generators/rails/app/templates/config/databases/postgresql.yml /Library/WebServer/Documents/postgresql /Library/WebServer/Documents/postgresql/html/app-postgres.html /Library/WebServer/Documents/postgresql/html/postgres-user.html /private/etc/apache2/users/postgres.conf /private/var/db/dslocal/nodes/Default/groups/_postgres.plist /private/var/db/dslocal/nodes/Default/sharepoints/postgres's Public Folder.plist /private/var/db/dslocal/nodes/Default/users/_postgres.plist /private/var/db/dslocal/nodes/Default/users/postgres.plist /System/Library/DirectoryServices/DefaultLocalDB/Default/groups/_postgres.plist /System/Library/DirectoryServices/DefaultLocalDB/Default/users/_postgres.plist /Users/postgres /Users/remcat/dev/working/startwire/vendor/plugins/foreign_keys/lib/foreign_keys/postgresql_adapter.rb /Users/remcat/Library/Application Support/CrashReporter/postgres_DCCEF98F-4602-5FF7-964F-5E717AC007B4.plist /Users/remcat/Library/Caches/Homebrew/postgresql-9.0.4.tar.bz2 /Users/remcat/Library/Caches/Metadata/Safari/History/http:%2F%2Fwww.postgresql.org%2Fdocs%2Fcurrent%2Fstatic%2Findex.html.webhistory /Users/remcat/Library/Logs/CrashReporter/postgres_2011-11-06-194716_Ramys-MacBook-Pro.crash /Users/remcat/Library/Logs/CrashReporter/postgres_2011-11-06-194742_Ramys-MacBook-Pro.crash /Users/remcat/Library/Logs/CrashReporter/postgres_2011-11-06-194757_Ramys-MacBook-Pro.crash /Users/remcat/Library/Logs/CrashReporter/postgres_2011-11-06-194958_Ramys-MacBook-Pro.crash /Users/remcat/Library/Logs/CrashReporter/postgres_2011-11-06-203352_Ramys-MacBook-Pro.crash /Users/remcat/Library/Logs/CrashReporter/postgres_2011-11-06-203359_Ramys-MacBook-Pro.crash /Users/remcat/Library/Logs/DiagnosticReports/.postgres_2011-11-06-194716_Ramys-MacBook-Pro.crash.plist /Users/remcat/Library/Logs/DiagnosticReports/.postgres_2011-11-06-194742_Ramys-MacBook-Pro.crash.plist /Users/remcat/Library/Logs/DiagnosticReports/.postgres_2011-11-06-194757_Ramys-MacBook-Pro.crash.plist /Users/remcat/Library/Logs/DiagnosticReports/.postgres_2011-11-06-194958_Ramys-MacBook-Pro.crash.plist /Users/remcat/Library/Logs/DiagnosticReports/.postgres_2011-11-06-203352_Ramys-MacBook-Pro.crash.plist /Users/remcat/Library/Logs/DiagnosticReports/.postgres_2011-11-06-203359_Ramys-MacBook-Pro.crash.plist /Users/remcat/Library/Logs/DiagnosticReports/postgres_2011-11-06-194716_Ramys-MacBook-Pro.crash /Users/remcat/Library/Logs/DiagnosticReports/postgres_2011-11-06-194742_Ramys-MacBook-Pro.crash /Users/remcat/Library/Logs/DiagnosticReports/postgres_2011-11-06-194757_Ramys-MacBook-Pro.crash /Users/remcat/Library/Logs/DiagnosticReports/postgres_2011-11-06-194958_Ramys-MacBook-Pro.crash /Users/remcat/Library/Logs/DiagnosticReports/postgres_2011-11-06-203352_Ramys-MacBook-Pro.crash /Users/remcat/Library/Logs/DiagnosticReports/postgres_2011-11-06-203359_Ramys-MacBook-Pro.crash /Users/remcat/Library/Saved Application State/org.postgresql.pgadmin.savedState /usr/bin/postgres_real /usr/include/postgres_ext.h /usr/include/postgresql /usr/include/postgresql/internal/postgres_fe.h /usr/include/postgresql/server/postgres.h /usr/include/postgresql/server/postgres_ext.h /usr/include/postgresql/server/postgres_fe.h /usr/lib/postgresql /usr/local/Library/Aliases/postgres /usr/local/Library/Formula/postgresql.rb /usr/local/var/postgres /usr/local/var/postgres/postgresql.conf /usr/share/devicemgr/backend/vendor/rails/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb /usr/share/devicemgr/backend/vendor/rails/railties/configs/databases/postgresql.yml /usr/share/devicemgr/webserver/gems/gems/eventmachine-0.12.10/lib/em/protocols/postgres3.rb /usr/share/man/man1/postgres.1.gz /usr/share/postgresql /usr/share/postgresql/postgres.bki /usr/share/postgresql/postgres.description /usr/share/postgresql/postgres.shdescription /usr/share/postgresql/postgresql.conf /usr/share/postgresql/postgresql.conf.sample