Created
October 15, 2022 23:58
-
-
Save stiwardjherikofcr/e2f3a7f5427c14c451106fa31bd92981 to your computer and use it in GitHub Desktop.
How To Completely Uninstall PostgreSQL || Ubuntu 20.04 LTS
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Step 1 — List All Postgres related packages | |
dpkg -l | grep postgres | |
# Step 2 — Remove all current Postgresql related packages | |
sudo apt --purge remove postgresql* | |
# Step 3 — Remove all of the PostgreSQL data and directories | |
sudo rm -rf /var/lib/postgresql/ | |
sudo rm -rf /var/log/postgresql/ | |
sudo rm -rf /etc/postgresql/ | |
# Step 4 — Remove the postgres user | |
sudo deluser postgres |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment