Ubuntu上彻底卸载Postgresql

http://stackoverflow.com/questions/2748607/how-to-thoroughly-purge-and-reinstall-postgresql-on-ubuntu

卸载当前所有Postgresql 相关的Package:

apt-get remove postgresql*

The following packages will be REMOVED:
 postgresql* postgresql-9.1* postgresql-client-9.1* postgresql-client-common* postgresql-common*


下面删除配置文件和User 是关键:

rm -r /etc/postgresql/
rm -r /var/lib/postgresql/
userdel -r postgres


BTW:

安装可以参照这个:

http://www.cnblogs.com/arvinlv/p/3189824.html

你可能感兴趣的:(Ubuntu上彻底卸载Postgresql)