- How To Completely Uninstall PostgreSQL
- Introduction
- Uninstall and remove PostgreSQL on Debian Linux
- Grep for all PostgreSQL packages in Debian Linux
- Remove all of the PostgreSQL data and directories
- Uninstall and remove PostgreSQL packages on Fedora Linux
- Grep for the PostgreSQL packages in Fedora using ‘rpm’
- Uninstall the PostgreSQL package using YUM remove
- Uninstall and remove PostgreSQL from Windows
- Delete the data folder for PostgreSQL in Windows
- Uninstall and remove PostgreSQL on macOS
- Remove the PostgreSQL data in a terminal in macOS
- Uninstall the Homebrew installation of PostgreSQL on macOS
- Conclusion
- Pilot the ObjectRocket Platform Free!
- Как удалить Postgres из моей установки?
- CentOS
- Removing postgresql
- Removing postgresql
- Re: Removing postgresql
- Re: Removing postgresql
- Removing postgresql
- Re: Removing postgresql
- Re: Removing postgresql
- Как удалить полностью postgresql определённой версии?
- How to remove Postgres from my installation?
- 5 Answers 5
How To Completely Uninstall PostgreSQL
Introduction
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.
Источник
Как удалить Postgres из моей установки?
У меня Ubuntu 9.10 (karmic), и когда я попытался установить новую программу, postgres был установлен как зависимость от этой программы, никаких проблем, если установка прошла успешно, но произошла ошибка, и Postgres был не установлено и приложение не работает. Я пытался обновить Postgres и ничего, только сообщение «произошла ошибка и ваш postgres не может быть установлен»
Теперь я хочу полностью удалить Postgres со своей машины, как я могу это сделать, я не хочу убивать процесс при каждой загрузке. Я просто хочу удалить Postgres.
Что такое командная строка?
Самый простой способ сделать это — открыть терминал и набрать:
Это также побудит вас удалить то программное обеспечение, которое зависит от Postgres, что в данном случае, по-видимому, вы хотели бы сделать.
Я лично не запускаю 9.10 или Postgres, поэтому вполне возможно, что Postgres устанавливает себя в несколько частей. В таком случае просто:
Вы получите список тех пакетов, которые установил Postgres. Затем просто используйте ту же команду «apt-get —purge remove . », но вместо просто postgresql, введите имя каждого пакета, разделенное пробелами, например:
Конечно, это зависит от списка установленных пакетов.
Шаги, которые работали на меня, Ubuntu 8.04.2 чтобы удалить postgres 8.3
Список всех пакетов, связанных с Postgres
Удалить все вышеперечисленное
Удалите следующие папки
Удалить пользователя postgres :
Одна команда, чтобы полностью удалить postgresql в терминале sudo apt-get —purge remove postgresql\* . Обратите внимание, что эта команда удалит postgresql и все его компоненты.
Спасибо Code Friendly , и я хочу поделиться тем, как я решил свою проблему.
Когда я обновлялся postgresql из приложения Synaptic, была установлена версия postgresql 10. Поэтому на моем компьютере с Debian были установлены две версии postgresql (10 и 9.6). Postgresql 9.6 слушаю по порту 5432 . Postgresql 10 прослушивание порта 5433 вместо 5432.
Когда я запускаю команду msfconsole в терминале, хотя metasploit подключается к базе данных msf через порт 5432, появляется следующее сообщение об ошибке:
Я удаляю версию 9.6 postgresql из приложения Synaptic, но проблема сохраняется (postgresql 9.6 больше не отображается в списке установленного программного обеспечения synaptic);
Но, выполнив следующую команду, мы увидим, что версия postgresql 9.6 не была полностью удалена:
С помощью следующей команды postgresql-9.6 полностью удален:
root@kali:
# sudo apt-get —purge remove postgresql-9.6
Затем я отредактировал файл /etc/postgresql/10/main/postgresql.conf , изменил номер порта на 5432 и проблема решена.
Появляется другое сообщение об ошибке:
Я обнаружил, что причина была в том, что на моем компьютере с Debian установлены две (2) версии Ruby, версии (2.2 и 2.3).
То же самое, я удаляю версию ruby 2.2 из приложения synaptic, и проблема решена, metasploit запускается без проблем.
Источник
CentOS
The Community ENTerprise Operating System
Removing postgresql
Removing postgresql
Post by fgoncalo » 2011/06/13 08:58:14
Is there any possible way of removing ALL data related to postgresql?
su —
yum remove *postgres*
But i dont thing it removes everything.
I want to do it, because i want to re-install everything again (postgresql,postgres-server, etc..)
Thanks in advance,
Filipe
Re: Removing postgresql
Post by TrevorH » 2011/06/13 18:59:37
[code]
yum remove postgres\*
mv /var/lib/pgsql /var/lib/old.pgsql
yum install postgres-whatever
[/code]
Please be aware that postgres-libs is a dependency for a large number of packages so running yum remove postgres\* may nuke considerably more than you expect so make sure you inspect the list of packages carefully before you blindly say ‘y’!
Re: Removing postgresql
Post by fgoncalo » 2011/06/14 00:14:43
Thank you very much for your answer. I’m going to give it a try, first thing tomorrow.
I’ll let you know if it worked for me.
I’m trying this, because I am trying to (re)install Postgresql. And when i try to command service postgresql-9.0 start it outputs FAILED.
Once again, thank you for your time,
Filipe
Removing postgresql
Post by pschaff » 2011/06/14 12:28:49
[quote]
fgoncalo wrote:
.
I’m trying this, because I am trying to (re)install Postgresql. And when i try to command service postgresql-9.0 start it outputs FAILED.
. [/quote]
You are not running CentOS postgresql-server as there is no such service. The CentOS packages are:
postgresql-server-8.1.23-1.el5_6.1
postgresql84-server-8.4.7-1.el5_6.1
Both provide /etc/rc.d/init.d/postgresql and not «postgresql-9.0». None of the well-known repos provides postgresql 9.0. The previous advice may not be applicable.
Re: Removing postgresql
Post by fgoncalo » 2011/06/14 13:39:04
So shall i remove evrything about postgresql that i have on my pc, and re install those packages that you’ve mentioned? Via yum?
Thank you for your time,
Filipe
Re: Removing postgresql
Post by pschaff » 2011/06/14 20:46:50
If you want to reinstall then remove all you have installed, but given the «foreign» version it may not have been installed by the package manager, which would make things more difficult.
Источник
Как удалить полностью postgresql определённой версии?
ubuntu 12.10.
Стояли postgresql 9.1, pgadmin 1.4
Установил postgresql 9.2.
1. но в систему остались данные от 9.1. Как его удалить полностью?
2. при загрузке системы postgresql автоматический не стартует.
Ubuntu 15.10(Cinnamon). Как удалить полностью Gnome который шел по стандарту?
Здравствуйте. Помогите удалить Gnome, чтобы освободить от него место на ЖД. В моей системе.
Получение данных из PostgreSQL с определённой периодичностью.
есть кто? подскажите а можно ли при помощи js выгребать данные из базы потсгрес с некой.
Как полностью удалить 1С?
Всем доброго времени суток! Подскажите по пунктам пожалуйста как удалить 1С 8.2ххх чтоб комп не.
Как полностью удалить лист
Ребята, я новичок в программировании и решил самостоятельно изучать пайтон. У меня вопрос. У меня.
Помощь в написании контрольных, курсовых и дипломных работ здесь.
Как полностью удалить TeamViewer
Нашёл в инете прогу TeamViewer-4, известна многим, но до этого я пользовался радмином на работе.
Как полностью удалить студию?
Привет! Я когда -то установил 2013 и теперь не могу удалить его полностью, есть ли утилита которая.
Как полностью удалить photoshop cc
Всем привет. Не подскажете как полностью удалить photoshop? Дело в том что стояло пиратская.
Как полностью удалить eclipse?
где находится менеджер пакетов в Windows XP?? Как получить к нему доступ: мне нужно удалить.
Источник
How to remove Postgres from my installation?
I have ubuntu 9.10(karmic), and when I attempted to install a new program, the postgres was installed as a dependency of that program, no problem at all if the installation occurs with success, but there was an error, and the Postgres was not installed and the application is not working. I had tryed to update the Postgres and nothing, only the message «there was an error and your postgres can not be installed»
Now I want to remove completely the Postgres from my machine, how can I do that, I do not want to kill the process every boot. I just want to remove Postgres.
What is the command line?
5 Answers 5
The simplest way to do this is to open a terminal and type:
This will also prompt you to remove that software that depends on Postgres, which in this case it appears you would like to do.
I do not personally run 9.10 or Postgres, so it is possible that Postgres installs itself in several parts. In that case, a simple:
Will get you the list of those packages that Postgres installed. Then, just use the same «apt-get —purge remove . » command but instead of just postgresql, type each package name, separated by spaces, like:
This is dependent on the list of packages installed, of course.
Steps that worked for me on Ubuntu 8.04.2 to remove postgres 8.3
List All Postgres related packages
Remove all above listed
Remove the following folders
Remove the postgres user:
One command to completely remove postgresql in terminal is sudo apt-get —purge remove postgresql\* . Please note that this command will remove postgresql and all it’s compenents.
Follow the commands:
- sudo apt-get —purge remove postgresql
List all postgres related packages:
- dpkg -l | grep postgres
remove all the above listed packages using the command :
- apt-get —purge remove package1 package2 ..
Confirm all the files and folders related to postgres/postgresql are deleted using the command :
- whereis postgres
- whereis postgresql
Remove all the files and folders listed using rm command.
Delete the user postgres using the command :
- userdel -f postgres
Thanks to Code Friendly , & I want to share how I solved my problem.
When I updated postgresql from the Synaptic application, it is the postgresql 10 version that was installed. So I had two versions of postgresql (10 & 9.6) installed in my debian machine. Postgresql 9.6 listening on port 5432 . Postgresql 10 listening on port 5433 instead of 5432.
When I run the comand msfconsole in a terminal, although metasploit connects to the msf database on port 5432, the following error message appears:
I unistall the 9.6 postgresql version from the Synaptic application, but the problem persists (postgresql 9.6 no longer appears in synaptic’s installed software list);
But by executing the command that follows we see that the version postgresql 9.6 was not completely unistalled:
With the following command, postgresql-9.6 uninstalled completely:
root@kali:
# sudo apt-get —purge remove postgresql-9.6
Then I edited the file /etc/postgresql/10/main/postgresql.conf , changed the port number to 5432 and the problem is solved.
Another error message appears:
I found that the cause was that two (2) versions of Ruby are installed in my debian machine, versions (2.2 & 2.3).
Same thing, I uninstall the ruby 2.2 version from the synaptic application and the problem is solved, metasploit starts without problems.
Источник