Re: [SLUG] Debian: How do I remove a package and all it's dependencies?
apt-get [remove|purge] package-name apt-get autoremove refer to the apt-get man page (man apt-get) for the nuances of apt-get's options. other useful tools are deborphan and the happy menu based orphaner. which you may have to apt-get install first :) Dean On Sun, 10 Aug 2008 12:13:41 +1000, Sonia Hamilton [EMAIL PROTECTED] wrote: Michael Lake wrote: 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? Perhaps use a tool like aptitude - it will find/display dependencies for you. -- Sonia Hamilton. -- SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/ Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html -- http://fragfest.com.au - http://bux.to/r=djzort -- SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/ Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html
Re: [SLUG] Debian: How do I remove a package and all it's dependencies?
Michael Lake wrote: 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? Perhaps use a tool like aptitude - it will find/display dependencies for you. -- Sonia Hamilton. -- SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/ Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html
[SLUG] Debian: How do I remove a package and all it's dependencies?
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. Mike -- Michael Lake Computational Research Centre of Expertise Science Faculty, UTS Ph: 9514 2238 -- UTS CRICOS Provider Code: 00099F DISCLAIMER: This email message and any accompanying attachments may contain confidential information. If you are not the intended recipient, do not read, use, disseminate, distribute or copy this message or attachments. If you have received this message in error, please notify the sender immediately and delete this message. Any views expressed in this message are those of the individual sender, except where the sender expressly, and with authority, states them to be the views of the University of Technology Sydney. Before opening any attachments, please check them for viruses and defects. Think. Green. Do. Please consider the environment before printing this email. -- SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/ Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html
Re: [SLUG] Debian: How do I remove a package and all it's dependencies?
apt-get remove $PACKAGENAME doesn't work for you? On Wed, Jul 23, 2008 at 4:41 PM, Michael Lake [EMAIL PROTECTED] wrote: 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. Mike -- Michael Lake Computational Research Centre of Expertise Science Faculty, UTS Ph: 9514 2238 -- UTS CRICOS Provider Code: 00099F DISCLAIMER: This email message and any accompanying attachments may contain confidential information. If you are not the intended recipient, do not read, use, disseminate, distribute or copy this message or attachments. If you have received this message in error, please notify the sender immediately and delete this message. Any views expressed in this message are those of the individual sender, except where the sender expressly, and with authority, states them to be the views of the University of Technology Sydney. Before opening any attachments, please check them for viruses and defects. Think. Green. Do. Please consider the environment before printing this email. -- SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/ Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html -- There is nothing more worthy of contempt than a man who quotes himself - Zhasper, 2004 -- SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/ Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html
Re: [SLUG] Debian: How do I remove a package and all it's dependencies?
On Wed, 2008-07-23 at 17:17 +1000, James Polley wrote: apt-get remove $PACKAGENAME doesn't work for you? followed by apt-get autoremove This will clean up some of those dependencies. -- SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/ Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html
Re: [SLUG] Debian: How do I remove a package and all it's dependencies?
quote who=Ken Foskey On Wed, 2008-07-23 at 17:17 +1000, James Polley wrote: apt-get remove $PACKAGENAME doesn't work for you? followed by apt-get autoremove You can also do autoremove in place of remove, to do it all at once. :-) - Jeff -- OSDC 2008: Sydney, Australiahttp://www.osdc.com.au/2008/ GDK (acronym): GNU's Not Unix Image Manipulation Program Tool-Kit Drawing-Kit. -- SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/ Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html
Re: [SLUG] Debian: How do I remove a package and all it's dependencies?
Jeff Waugh wrote: On Wed, 2008-07-23 at 17:17 +1000, James Polley wrote: apt-get remove $PACKAGENAME doesn't work for you? The above won't remove a package if there are dependencies. Jeff and Ken said: apt-get autoremove You can also do autoremove in place of remove, to do it all at once. :-) That option is not listed in man dpkg or man apt-get. 'apt-get autoremove test' Invalid operation autoremove I'm using dpkg as I can cat a list of files into it. Mike -- Michael Lake Computational Research Centre of Expertise Science Faculty, UTS Ph: 9514 2238 -- UTS CRICOS Provider Code: 00099F DISCLAIMER: This email message and any accompanying attachments may contain confidential information. If you are not the intended recipient, do not read, use, disseminate, distribute or copy this message or attachments. If you have received this message in error, please notify the sender immediately and delete this message. Any views expressed in this message are those of the individual sender, except where the sender expressly, and with authority, states them to be the views of the University of Technology Sydney. Before opening any attachments, please check them for viruses and defects. Think. Green. Do. Please consider the environment before printing this email. -- SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/ Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html
Re: [SLUG] Debian: How do I remove a package and all it's dependencies?
On Wed, Jul 23, 2008 at 5:57 PM, Michael Lake [EMAIL PROTECTED] wrote: Jeff Waugh wrote: On Wed, 2008-07-23 at 17:17 +1000, James Polley wrote: apt-get remove $PACKAGENAME doesn't work for you? The above won't remove a package if there are dependencies. Jeff and Ken said: apt-get autoremove You can also do autoremove in place of remove, to do it all at once. :-) hat option is not listed in man dpkg or man apt-get. It is on 50% of the (two) machines I tested - it's not on a dapper machine but is on a hardy machine. I suspect you have something that's not hardy - perhaps an older ubuntu, or one of the inf^H^H^Hother distributions? 'apt-get autoremove test' Invalid operation autoremove I'm using dpkg as I can cat a list of files into it. Okay, so you have a list of files which you want to process. dpkg is still the wrong tool for the job... while read PACKAGENAME do apt-get remove ${PACKAGENAME} done $FILENAME Mike -- Michael Lake Computational Research Centre of Expertise Science Faculty, UTS Ph: 9514 2238 -- UTS CRICOS Provider Code: 00099F DISCLAIMER: This email message and any accompanying attachments may contain confidential information. If you are not the intended recipient, do not read, use, disseminate, distribute or copy this message or attachments. If you have received this message in error, please notify the sender immediately and delete this message. Any views expressed in this message are those of the individual sender, except where the sender expressly, and with authority, states them to be the views of the University of Technology Sydney. Before opening any attachments, please check them for viruses and defects. Think. Green. Do. Please consider the environment before printing this email. -- SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/ Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html -- There is nothing more worthy of contempt than a man who quotes himself - Zhasper, 2004 -- SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/ Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html
Re: [SLUG] Debian: How do I remove a package and all it's dependencies?
On Wed, 2008-07-23 at 18:07 +1000, Peter Hardy wrote: Hey hey. On Wed, 2008-07-23 at 17:57 +1000, Michael Lake wrote: Jeff Waugh wrote: On Wed, 2008-07-23 at 17:17 +1000, James Polley wrote: apt-get remove $PACKAGENAME doesn't work for you? The above won't remove a package if there are dependencies. It should. What version of debian / apt do you have? To pick an example at random: [EMAIL PROTECTED]:~% sudo apt-get remove compiz-core sudo apt-get -y remove compiz-core Forces the yes - very dangerous! -- SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/ Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html
Re: [SLUG] Debian: How do I remove a package and all it's dependencies?
On Wed, Jul 23, 2008 at 7:13 PM, Ken Foskey [EMAIL PROTECTED] wrote: On Wed, 2008-07-23 at 18:07 +1000, Peter Hardy wrote: Hey hey. On Wed, 2008-07-23 at 17:57 +1000, Michael Lake wrote: Jeff Waugh wrote: On Wed, 2008-07-23 at 17:17 +1000, James Polley wrote: apt-get remove $PACKAGENAME doesn't work for you? The above won't remove a package if there are dependencies. It should. What version of debian / apt do you have? To pick an example at random: [EMAIL PROTECTED]:~% sudo apt-get remove compiz-core sudo apt-get -y remove compiz-core Forces the yes - very dangerous! Actually, that's only assume yes, and it's only mildly dangerous. As the man page says, If an undesirable situation, such as changing a held package, trying to install a unauthenticated package or removing an essential package occurs then apt-get will abort. To force the yes, use --force-yes. Again quoting the man page, Using force-yes can potentially destroy your system!. Dammit. Am I being a pedant again? -- SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/ Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html -- There is nothing more worthy of contempt than a man who quotes himself - Zhasper, 2004 -- SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/ Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html
Re: [SLUG] Debian: How do I remove a package and all it's dependencies?
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
Re: [SLUG] Debian: How do I remove a package and all it's dependencies?
Quoting Michael Lake [EMAIL PROTECTED]: That option is not listed in man dpkg or man apt-get. 'apt-get autoremove test' Invalid operation autoremove Mike, On older debian/ubuntu installs you can use deborphan to find any packages that are no longer required. Then if you also install wajig (an commandline apt frontend amongst other things) you can do something similiar to 'apt-get autoremove' eg: wajig remove package wajig removeorphans -- SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/ Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html
Re: [SLUG] Debian: How do I remove a package and all it's dependencies?
Peter Hardy wrote: Hey hey. On Wed, Michael Lake wrote: apt-get remove $PACKAGENAME doesn't work for you? The above won't remove a package if there are dependencies. It should. What version of debian / apt do you have? To pick an example at random: [EMAIL PROTECTED]:~% sudo apt-get remove compiz-core Ah, maybe the difference is that in my case its an upsteam dependency (something depends on what I want to remove) whereas in the example above its a downsteam dependency (what I want to remove depends on something). This is what I get: # cat installed.packages | grep evol | cut -f1 evolution-common evolution-data-server evolution-data-server-common evolution-webcal # # cat installed.packages | grep evol | cut -f1 | xargs dpkg -P (Reading database ... 79929 files and directories currently installed.) Would remove or purge evolution-common ... dpkg: dependency problems prevent removal of evolution-data-server: ekiga depends on evolution-data-server. dpkg: error processing evolution-data-server (--purge): dependency problems - not removing dpkg: dependency problems prevent removal of evolution-data-server-common: evolution-data-server depends on evolution-data-server-common (= 1.6.3-5etch1). dpkg: error processing evolution-data-server-common (--purge): dependency problems - not removing Would remove or purge evolution-webcal ... Errors were encountered while processing: evolution-data-server evolution-data-server-common # I'm using Debian version 4.0 'apt-get autoremove test' Invalid operation autoremove Sounding more and more like you've got a fairly old debian. You can try using the apt-rdepends tool to list dependencies. If it's not available, I'd probably just use dpkg to get a list of dependencies and then do exactly what you're doing now. Ugh. :-) Maybe I'll just use the Ugh method. I am making up a virtual Debian system using Xen. I tarballed up my Debian etch and copied it to a new xen instance with a blank filesystem and booted into it and I'm removing all packages that I don't need. I'm starting therefore with a desktop distro and cutting it down. I couldn't start with a minimal Debian install via netboot or dbootstrap as this instance is under Centos and I couldn't get dbootstrap to compile under Centos. Mike -- Michael Lake Computational Research Centre of Expertise Science Faculty, UTS Ph: 9514 2238 -- UTS CRICOS Provider Code: 00099F DISCLAIMER: This email message and any accompanying attachments may contain confidential information. If you are not the intended recipient, do not read, use, disseminate, distribute or copy this message or attachments. If you have received this message in error, please notify the sender immediately and delete this message. Any views expressed in this message are those of the individual sender, except where the sender expressly, and with authority, states them to be the views of the University of Technology Sydney. Before opening any attachments, please check them for viruses and defects. Think. Green. Do. Please consider the environment before printing this email. -- SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/ Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html
Re: [SLUG] Debian: How do I remove a package and all it's dependencies?
Hi all Sounding more and more like you've got a fairly old debian. You can try using the apt-rdepends tool to list dependencies. If it's not available, I'd probably just use dpkg to get a list of dependencies and then do exactly what you're doing now. Ugh. :-) Michael Lake wrote: Maybe I'll just use the Ugh method. This is what I need to remove, maybe all I think. If I do dpkg -P gnome-core it will just remove gnome-core. I presume there is something that is higher up the tree that if I removed it it would be removed along with gnome-* bluez-gnome gnome-about gnome-applets gnome-applets-data gnome-backgrounds gnome-bin gnome-cards-data gnome-control-center gnome-core gnome-cups-manager gnome-desktop-data gnome-doc-utils gnome-extra-icons gnome-games gnome-games-data gnome-icon-theme gnome-keyring gnome-keyring-manager gnome-libs-data gnome-lokkit gnome-media gnome-media-common gnome-menus gnome-mime-data gnome-netstatus-applet gnome-nettool gnome-panel gnome-panel-data gnome-power-manager gnome-screensaver gnome-session gnome-system-monitor gnome-system-tools gnome-terminal gnome-terminal-data gnome-themes gnome-themes-extras gnome-user-guide gnome-utils gnome-volume-manager gnomebaker gstreamer0.10-gnomevfs iceweasel-gnome-support libgnome-desktop-2 libgnome-keyring0 libgnome-media0 libgnome-menu2 libgnome-pilot2 libgnome-window-settings1 libgnome2-0 libgnome2-canvas-perl libgnome2-common libgnome2-perl libgnome2-vfs-perl libgnome32 libgnomecanvas2-0 libgnomecanvas2-common libgnomecups1.0-1 libgnomecupsui1.0-1c2a libgnomeprint2.2-0 libgnomeprint2.2-data libgnomeprintui2.2-0 libgnomeprintui2.2-common libgnomesupport0 libgnomeui-0 libgnomeui-common libgnomeui32 libgnomevfs2-0 libgnomevfs2-bin libgnomevfs2-common libgnomevfs2-extra network-manager-gnome python-gnome2 python-gnome2-desktop python-gnome2-extras -- Michael Lake Computational Research Centre of Expertise Science Faculty, UTS Ph: 9514 2238 -- UTS CRICOS Provider Code: 00099F DISCLAIMER: This email message and any accompanying attachments may contain confidential information. If you are not the intended recipient, do not read, use, disseminate, distribute or copy this message or attachments. If you have received this message in error, please notify the sender immediately and delete this message. Any views expressed in this message are those of the individual sender, except where the sender expressly, and with authority, states them to be the views of the University of Technology Sydney. Before opening any attachments, please check them for viruses and defects. Think. Green. Do. Please consider the environment before printing this email. -- SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/ Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html
Re: [SLUG] Debian: How do I remove a package and all it's dependencies?
On Thu, 2008-07-24 at 11:07 +1000, Michael Lake wrote: Peter Hardy wrote: Hey hey. On Wed, Michael Lake wrote: apt-get remove $PACKAGENAME doesn't work for you? The above won't remove a package if there are dependencies. It should. What version of debian / apt do you have? To pick an example at random: [EMAIL PROTECTED]:~% sudo apt-get remove compiz-core Ah, maybe the difference is that in my case its an upsteam dependency (something depends on what I want to remove) whereas in the example above its a downsteam dependency (what I want to remove depends on something). `apt-get remove` will *only* handle upstream dependencies. The autoremove command that etch doesn't seem to support can do both upstream and downstream. This is what I get: # cat installed.packages | grep evol | cut -f1 evolution-common evolution-data-server evolution-data-server-common evolution-webcal # # cat installed.packages | grep evol | cut -f1 | xargs dpkg -P (Reading database ... 79929 files and directories currently installed.) Would remove or purge evolution-common ... dpkg: dependency problems prevent removal of evolution-data-server: ekiga depends on evolution-data-server. dpkg: error processing evolution-data-server (--purge): dependency problems - not removing dpkg: dependency problems prevent removal of evolution-data-server-common: evolution-data-server depends on evolution-data-server-common (= 1.6.3-5etch1). dpkg: error processing evolution-data-server-common (--purge): dependency problems - not removing Would remove or purge evolution-webcal ... Errors were encountered while processing: evolution-data-server evolution-data-server-common # $ sudo dpkg -r evolution-common dpkg: dependency problems prevent removal of evolution-common: evolution depends on evolution-common (= 2.22.3.1-0ubuntu1). dpkg: error processing evolution-common (--remove): dependency problems - not removing Errors were encountered while processing: evolution-common $ sudo apt-get remove evolution-common [sudo] password for phardy: Reading package lists... Done Building dependency tree Reading state information... Done The following packages will be REMOVED: evolution evolution-common evolution-exchange evolution-plugins 0 upgraded, 0 newly installed, 4 to remove and 0 not upgraded. After this operation, 106MB disk space will be freed. Do you want to continue [Y/n]? apt marks evolution-common, and everything that depends on it, and any/all downstream packages for removal. For giggles, `try apt-get remove libc6` and see what it tells you. -- Pete -- SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/ Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html