Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am a new Ubuntu 12.04 user and I'm using 64bit.

This morning I installed Posgresql 9.2 from the graphical installer (not from Ubuntu repository) . Now I want to uninstall it, but I don't know how.

Anyone please show me the way out?

share|improve this question
up vote 5 down vote accepted

The installer should have installed also a program called uninstall-postgresql. Open a terminal and run

sudo uninstall-postgresql

This should work. If the shell complains that it cannot find the program (command not found), find where it was installed:

sudo updatedb
locate uninstall-postgresql

and run it with the full path returned by locate.

share|improve this answer
i seem to be in a streak of "just a few min too late" today :P – Karthik T Oct 9 '12 at 7:25
so here is a +1 for you :-) – January Oct 9 '12 at 7:32
@January: the first command returns "command not found" and the second returns nothing. The situation may be complicated because I tried some other ways to uninstall and re-install. However, there's still Postgresql 9.2 item when I run pgAdmin3. – Cao Minh Tu Oct 9 '12 at 7:52
Since you installed it just today, it is possible locate doesnt know whr it is. can you try sudo updatedb and then try the locate again? – Karthik T Oct 9 '12 at 8:07
After "sudo updatedb", locate worked and I could uninstall with "sudo /path/to/uninstall-postgresql". Thank you very much for your help, January and Karthik T. – Cao Minh Tu Oct 9 '12 at 8:21

Welcome to Ubuntu!

Generally, in such a situation, you would try to find your program in Software Center or Synaptic Package Manager and then remove from there.

Specifically in this case, it appears there is a script somewhr that is made for this purpose. According to this post, there is a uninstall-postgresql script that you can run by opening Terminal and typing that in. If that doesnt work, that post has more information that you can go through.

share|improve this answer
I opened Synatic, searched for "postgresql" and there were so many items that I don't know what is what. I'll try other ways in your link above. Thanks. – Cao Minh Tu Oct 9 '12 at 7:56
in such a case i would try to find the most generic one. that tends to be the main or parent package and the rest would be modules or plugins. In your case however it is a special install, so it might be better trying to track down the uninstaller, try my comment on the other answer. – Karthik T Oct 9 '12 at 8:08

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.