Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I have Postgresql 9.1.1 in my Ubuntu 12.04 which got installed due to automatic upgrades and whenever I uninstall it using the command:

sudo apt-get --purge remove postgresql-9.1.1

I get an error saying:

E: Unable to locate package postgresql-9.1.1
E: Couldn't find any package by regex 'postgresql-9.1.1

Can somebody tell me how to uninstall this package completely so that I can install the other lower version - 8.4.7

share|improve this question
    
The second part of your question (downgrading) is answered where you've asked it: askubuntu.com/questions/285232/how-do-i-downgrade-postgresql –  don.joey Apr 25 '13 at 9:45

4 Answers 4

Try:

sudo apt-get --purge remove postgresql
share|improve this answer

Try:

sudo apt-get --purge remove postgresql-9.1

Also you can install 8.4.7 and stop the server postgresql-9.1.

share|improve this answer

If you want to uninstall postgresql and any related package, you should use autoremove:

sudo apt-get --purge autoremove postgresql*

This will select any package starting with postgresql and remove any automatic dependency that these packages installed.

share|improve this answer

The version 9.1.1 of PostgerSQL is located in the package postgresql-9.1. So you should remove this package:

sudo apt-get purge postgresql-9.1

The second part of your question is already answered here: How do I downgrade PostgreSQL?

share|improve this answer

Your Answer

 
discard

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.