0

I have packages that I need to remove including postgresql-client-16, postgresql-client-18, postgresql-client-common and postgreql-common. Whenever I try to remove/purge any of them I get a message saying

/var/lib/dpkg/info/postgresql-client-16.prerm: 10: .: cannot open /usr/share/postgresql-common/maintscripts0functions: No such file
dpkg: error processing package postgres-client-16 (--remove):
installed postgres1l-client-16 package pre-removal script subprocess returned error exit status 2
dpkg: too many errors, stopping
/var/lib/dpkg/info/postgresql-client-16.postinst: 7: .: cannot open /usr/share/postgresql-common/maintscripts-functions: No such file
dpkg: error while cleaning up:
installed postgresql-client-16 package post-installation script subprocess returned error exit status 2
Errors were encountered while processing: 
postgresql-client-16
Processing was halted because there were too many errors
needrestart is being skipped since dpkg has failed

(if there is typo above it's because I manually typed the console message from the laptop I'm using for ubuntu which doesn't have a GUI)

2
  • 2
    Well, /usr/share/postgresql-common/maintscripts-functions appears to be provided by the postgresql-client-common package so perhaps try re-installing that first? Commented Sep 29 at 1:49
  • re: typing instead of copy and paste: the gpm package provides mouse selection with copy and paste on the console. also you can just redirect the output of a program to a file (in the case of apt-get, you will probably need to use either --assume-no or --assume-yes because with the output redirected you won't be able to see any questions it asks. or you could use tee) Commented Sep 29 at 2:31

0

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.