Answered by : lennox-omondi
sudo apt-get --purge remove postgresql
sudo apt-get purge postgresql*
sudo apt-get --purge remove postgresql postgresql-doc postgresql-common
Source : | Last Update : Thu, 12 Nov 20
Answered by : nisarg-joshi
sudo apt-get --purge remove postgresql postgresql-*
Source : https://askubuntu.com/questions/32730/how-to-remove-postgres-from-my-installation | Last Update : Tue, 28 Jun 22
Answered by : jittery-jay-omy65vy3tkmn
sudo apt-get --purge remove postgresql postgresql-doc postgresql-common
Source : https://askubuntu.com/questions/32730/how-to-remove-postgres-from-my-installation | Last Update : Thu, 24 Jun 21
Answered by : augusto-vicente
sudo apt-get purge postgresql-<version>
# some cleanups
sudo apt-get autoremove
sudo rm -rf /etc/postgresql
sudo rm -rf /var/lib/postgresql
sudo find / -iname "*postgres*" -exec rm -rf {} \;
Source : https://www.squash.io/step-by-step-process-to-uninstall-postgresql-on-ubuntu/ | Last Update : Sat, 30 Dec 23
Answered by : winston-mukwasi
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
happy coding :)
Source : | Last Update : Fri, 01 Jul 22
Answered by : puzzled-polecat-xg2iw8osddld
sudo apt-get --purge remove postgresql
Source : https://askubuntu.com/questions/32730/how-to-remove-postgres-from-my-installation | Last Update : Sun, 31 Oct 21
Answered by : you
sudo apt-get purge postgresql-<version>
Source : | Last Update : Tue, 19 Sep 23