sudo apt-get purge postgresql-9.1 sudo apt-get purge postgresql-9.1* sudo apt-get purge postgresql-8.4 sudo apt-get purge postgresql-8.4* sudo apt-get install postgresql-9.1 sudo apt-get install postgresql-client-9.1
Sources:
http://ubuntuforums.org/showthread.php?t=1862358
https://help.ubuntu.com/community/PostgreSQL
http://www.cyberciti.biz/faq/howto-add-postgresql-user-account/