I am trying to uninstall the package openssh-client using dpkg. I also have the packages openssh-server and ssh-askpass-gnome installed and want to uninstall those as well.

Currently I have the command dpkg -r openssh-client but that gives an error message that says

openssh-server depends on opessh-client.
ssh-askpass-gnome depends on openssh-client however:
Package openssh-client is to be removed

dpkg: error processing openssh-client (--remove)
dependency problems - not removing

I want to remove all dependencies as well as openssh-client. I've tried the -B flag (aka --auto-deconfigure) but it does nothing

Apt-get works, but sometimes requires input (even with -y) and that is not acceptable (running from a script).

(Ubuntu 8.04.3 server)

link|improve this question
feedback

2 Answers

up vote 0 down vote accepted

Search for a command switch in the dpkg manual to remove dependencies.

FYI --force is probably not what you want.

link|improve this answer
I have and it seems to say that --auto-deconfigure is the correct argument to use, but it does nothing. If it is a bug I will report it, but it seemed more like I was doing something incorrectly. unixhelp.ed.ac.uk/CGI/man-cgi?dpkg – HalfBrian Dec 8 '09 at 19:30
FYI I filed a bug: bugs.launchpad.net/ubuntu/+source/dpkg/+bug/494161 – HalfBrian Dec 8 '09 at 19:54
Yeah that definitely looks like a bug then. Congratulations on finding one. – Broam Dec 9 '09 at 17:39
feedback

If you want dependencies handled automatically when removing / purging packages, dpkg can be a pain. Aptitude is the command you want.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.