2008/7/23 Michael Lake <[EMAIL PROTECTED]>: > Hi all > > I have a Debian server and I wish to remove several dozen packages. > How do I remove a package and it's dependencies? > > So far I'm doing this: > > cat list_to_remove | xargs dpkg -P > > where list_to_remove is like this: > atlas3-base > atlas3-base-dev > blast2 > bioperl > .... > > I end up with some packages not being removed as their are dependencies. > I then manually purge them with dpkg -P some_package_dependency-1 > and again till I can remove that package. > > I'd like also to check the command that would be used with a --no-act or > something so I can see if things would get removed that I dont want removed > also. > > I also would like to remove all of Gnome and GDM similarly.
So far no one mentioned the option to tell "aptitude" to mark packages as "leave installed only if something still needs them". I try to mark all packages which I don't really need by themselves as such. For instance, you can just type "M" on all the installed packages section in aptitude then unmark the ones you want to keep even though nothing else depends on them. Once you get into the habit of marking packages this way through aptitude you don't have to take such a drastic step. Aptitude can be controlled from the command line as well if you want to script this, though it's interactive TUI (Text User Interface) is very useful to scan the status and see what's going to happen (and revert if you don't like it). --Amos -- SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/ Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html