Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I've tried

sudo apt-get purge postgresql
sudo apt-get autoremove postgresql

and

sudo apt-get --purge remove postgresql

But after this dpkg -l | grep postgres gives me that:

pi  postgresql-9.1                            9.1.11-0ubuntu0.13.04                    amd64        object-relational SQL database, version 9.1 server
pi  postgresql-client-9.1                     9.1.11-0ubuntu0.13.04                    amd64        front-end programs for PostgreSQL 9.1
ii  postgresql-client-common                  140                                      all          manager for multiple PostgreSQL client versions
ii  postgresql-common                         140                                      all          PostgreSQL database-cluster manager
ii  postgresql-contrib                        9.1+140                                  all          additional facilities for PostgreSQL (supported version)
ii  postgresql-contrib-9.1                    9.1.11-0ubuntu0.13.04                    amd64        additional facilities for PostgreSQL
ii  postgresql-doc-9.1                        9.1.11-0ubuntu0.13.04                    all          documentation for the PostgreSQL database management system

And if I try to start psql:

psql: could not connect to server: No such file or directory
    Is the server running locally and accepting
    connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"?

So, as I can see, postgresql is installed.

share|improve this question
1  
I've tried sudo apt-get --purge remove all packages shown by dpkg -l | grep postgres and sudo apt-get install postgresql-9.1 . And it worked for me. –  user1858864 Jan 10 at 1:55

1 Answer 1

apt-get --purge remove postgresql-common

With dpkg --info <packagename> you can see, which is required by this current package. In most cases, there is a simple package, which is needed by all. This can be removed with apt.

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.