Remove postgresql Error

by Moatez Bouhdid   Last Updated February 13, 2018 14:02 PM

I'm trying to remove PostgreSQL 9.1 from ubuntu 14.04 but I'm getting an error :

sudo apt-get --purge remove postgresql
...
Package 'postgresql' is not installed, so not removed
update-alternatives: error: alternative pg_basebackup.1.gz can't be slave of postmaster.1.gz : it is a slave of psql.1.gz
dpkg: error processing postgresql-client-9.3 (--configure): subprocess installed post-installation script returned error exit status 2

I've tried this solution :

update-alternatives --remove pg_basebackup.l.gz /usr/share/postgresql/9.1/man/man1/pg_basebackup.1.gz

But it didn't work.

What should I do?

Tags : 14.04 postgresql


Answers 1


It is likely that the postgresql package name isn't exactly postgresql

The following command will catch more patterns of postgresql:

apt-get --purge remove postgresql\*

Note: You should make sure that PostgreSQL isn't running.

The following command should return nothing:

ps -C postgres
Yaron
Yaron
February 13, 2018 13:55 PM

Related Questions


Forgot my Postgresql password

Updated March 08, 2017 16:02 PM

Cannot connect to postgresql on port 5432

Updated April 22, 2015 23:01 PM



How do I install pgAdmin III for postgreSQL 9.2?

Updated August 13, 2015 18:01 PM