Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

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

How can I completely uninstall postgres and reinstall it. I have tried:

sudo apt-get --purge remove postgresql postgresql-doc postgresql-common

But I got:

Package postgresql is not installed, so not removed
Package postgresql-doc is not installed, so not removed
You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies:
 postgresql-client-8.4 : Depends: postgresql-client-common (>= 104~) but it is not going to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).
share|improve this question
What is the result of the command apt-get -f install? – Ciaran Liedeman Nov 2 '11 at 14:55
The following NEW packages will be installed: postgresql-client-common – Chris Muench Nov 2 '11 at 15:00
That seemed to fix my install – Chris Muench Nov 2 '11 at 15:00
So is your problem solved? – Ciaran Liedeman Nov 2 '11 at 15:06
Yes it is solved – Chris Muench Nov 2 '11 at 15:07

I didn't need to reinstall, I just simply needed to apt-get -f install to install the client-common tools.

share|improve this answer

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.