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'm tyring to remove postgresql-client-common from my machine but I'm getting this error:

E: postgresql-9.2: subprocess installed pre-removal script returned error exit status 2
E: postgresql-client-9.2: subprocess installed pre-removal script returned error exit status 2
E: postgresql-common: subprocess installed pre-removal script returned error exit status 2

I've tried: sudo apt-get -f install

But it fails also:

lucid@ubuntu:~$ sudo apt-get -f install
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Correcting dependencies... Done
The following packages will be REMOVED:
  postgresql-9.2 postgresql-client-9.2 postgresql-client-common
  postgresql-common
0 upgraded, 0 newly installed, 4 to remove and 561 not upgraded.
4 not fully installed or removed.
After this operation, 23.6MB disk space will be freed.
Do you want to continue [Y/n]? y
(Reading database ... 131347 files and directories currently installed.)
Removing postgresql-9.2 ...
dpkg (subprocess): unable to execute installed pre-removal script: Exec format error
dpkg: error processing postgresql-9.2 (--remove):
 subprocess installed pre-removal script returned error exit status 2
dpkg (subprocess): unable to execute installed post-installation script: Exec format error
dpkg: error while cleaning up:
 subprocess installed post-installation script returned error exit status 2
Removing postgresql-client-9.2 ...
dpkg (subprocess): unable to execute installed pre-removal script: Exec format error
dpkg: error processing postgresql-client-9.2 (--remove):
 subprocess installed pre-removal script returned error exit status 2
Removing postgresql-common ...
dpkg (subprocess): unable to execute installed pre-removal script: Exec format error
dpkg: error processing postgresql-common (--remove):
 subprocess installed pre-removal script returned error exit status 2
Removing postgresql-client-common ...
dpkg (subprocess): unable to execute installed post-removal script: Exec format error
dpkg: error processing postgresql-client-common (--remove):
 subprocess installed post-removal script returned error exit status 2
No apport report written because MaxReports is reached already
                                                              Errors were encountered while processing:
 postgresql-9.2
 postgresql-client-9.2
 postgresql-common
 postgresql-client-common
E: Sub-process /usr/bin/dpkg returned an error code (1)

How to I fix this? I'm using Ubuntu 10.04

share|improve this question
    
How did you install it? –  Mitch Jun 19 '13 at 7:17

1 Answer 1

up vote 0 down vote accepted

I described an solution for a similar problem. Maybe it fixes your problem too.

How do I fix the package problem I have received after a failed attempt at installing QtOctave?

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.