Skip to content

Instantly share code, notes, and snippets.

@dhanesh-ideas2it
Created June 10, 2016 13:22
Show Gist options
  • Select an option

  • Save dhanesh-ideas2it/208c98ba6e3ee77b9ed2cdf6fb6f1946 to your computer and use it in GitHub Desktop.

Select an option

Save dhanesh-ideas2it/208c98ba6e3ee77b9ed2cdf6fb6f1946 to your computer and use it in GitHub Desktop.
http://stackoverflow.com/questions/2748607/how-to-thoroughly-purge-and-reinstall-postgresql-on-ubuntu
1. apt-get --purge remove postgresql\*
to remove everything PostgreSQL from your system. Just purging the postgres package isn't enough since it's just an empty meta-package.
Once all PostgreSQL packages have been removed, run:
2. rm -r /etc/postgresql/
3. rm -r /etc/postgresql-common/
4. rm -r /var/lib/postgresql/
5. userdel -r postgres
6. groupdel postgres
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment