View previous topic :: View next topic |
Author |
Message |
Barabbas n00b
Joined: 30 Oct 2008 Posts: 6
|
Posted: Thu Oct 30, 2008 9:23 am Post subject: Removing unused dependencies |
|
|
I want to clean my system from unused stuff, but dont know which packages are safe to remove, and which are still needed as a dependency (direct/indirect) for some other program.
Is there a prefered way to see this or do I have to do it manually (and how )?
Also, what is the way to list all packages that are installed on a computer (everything in world, and everything installed automaticaly by emerge)? |
|
Back to top |
|
|
cjubon Guru
Joined: 03 Jul 2007 Posts: 450 Location: Vienna/Europe
|
Posted: Thu Oct 30, 2008 10:41 am Post subject: |
|
|
Quote: | I want to clean my system from unused stuff, but dont know which packages are safe to remove, and which are still needed as a dependency (direct/indirect) for some other program.
Is there a prefered way to see this |
Code: | emerge -av --depclean | You might want to clean your /var/lib/portage/world file first, and to run revdep-rebuild after emerge depclean. _________________ Mandrake Dec 2001 · Debian "Woody" Aug 2002 · Gentoo Jan 2004 · Funtoo Oct 2009 |
|
Back to top |
|
|
swimmer Veteran
Joined: 15 Jul 2002 Posts: 1330 Location: Netherlands
|
Posted: Thu Oct 30, 2008 11:05 am Post subject: |
|
|
And the warning when running 'emerge --depclean' recommends Code: | emerge --update --newuse --deep world | *before* executing 'emerge --depclean -av' ...
HTH
swimmer |
|
Back to top |
|
|
notHerbert Advocate
Joined: 11 Mar 2008 Posts: 2228 Location: 45N 73W
|
Posted: Thu Oct 30, 2008 2:36 pm Post subject: |
|
|
... and revdep-rebuild after.
EDIT: Oops!
Last edited by notHerbert on Thu Oct 30, 2008 4:22 pm; edited 1 time in total |
|
Back to top |
|
|
swimmer Veteran
Joined: 15 Jul 2002 Posts: 1330 Location: Netherlands
|
Posted: Thu Oct 30, 2008 3:06 pm Post subject: |
|
|
notHerbert wrote: | ... and revdep-rebuild after. | Of course, but this was mentioned already |
|
Back to top |
|
|
swimmer Veteran
Joined: 15 Jul 2002 Posts: 1330 Location: Netherlands
|
Posted: Thu Oct 30, 2008 3:14 pm Post subject: |
|
|
I use btw. since more than 1 year this script to maintain my systems and I am more than satisfied with it ...
HTH
swimmer |
|
Back to top |
|
|
aliquid n00b
Joined: 14 Mar 2008 Posts: 37
|
Posted: Thu Oct 30, 2008 5:27 pm Post subject: |
|
|
If you want to remove even more packages than emerge --depclean does, you can try:
Code: | emerge -av --depclean --with-bdeps n |
|
|
Back to top |
|
|
FaeLLe n00b
Joined: 13 Aug 2007 Posts: 13 Location: London
|
Posted: Mon Jun 16, 2014 4:11 pm Post subject: |
|
|
aliquid wrote: | If you want to remove even more packages than emerge --depclean does, you can try:
Code: | emerge -av --depclean --with-bdeps n |
|
Can someone peer review this command please?
It wanted to remove so many more packages than the usual command - emerge -av --depclean |
|
Back to top |
|
|
ct85711 Veteran
Joined: 27 Sep 2005 Posts: 1791
|
Posted: Mon Jun 16, 2014 6:04 pm Post subject: |
|
|
Well, with-bdeps is meaning build time dependency's that are not strictly required to run the program. Here's the info from emerge's man page reguarding this command:
Code: |
--with-bdeps < y | n >
In dependency calculations, pull in build time dependencies that are not
strictly required. This defaults to ´n´ for installation actions, meaning they
will not be installed, and ´y´ for the --depclean action, meaning they will not
be removed. This setting can be added to EMERGE_DEFAULT_OPTS (see make.conf(5))
and later overridden via the command line.
|
So, in short bdeps is grabbing packages that are only needed to build a package, and is NOT installed by default, so it shouldn't need to remove anything additional either. This is assuming you did not change the default setttings for this to begin with. So personaly, I would be extra cautious on what additional packages "--with-bdeps n" wants to also remove, as I would think it's removing something that may not be safe to remove. Of course, like everyone else has mentioned, do run revdep-rebuild afterwards to ensure nothing was broken. It is also a good idea, to just go through the list that depclean wants to remove before hand too (I usualy do -pv instead of -a myself).
Another command, that I like to use too, is "equery depends ***" from gentoolkit to see what packages depends on it (adding a -D will also list indirect dependencies too).
Overall, it just depends on how much do you want to clean off your system. Overall, it's pretty safe to just do 'emerge -av --depclean' by it's self; and I've rarely have anything break from that (a couple packages, emerge ended up reinstalling all over again for something else, just to be removed on the next depclean; but everything still ran perfectly fine). Now days, portage is getting pretty good, in there is very little in breakages (the only breakages I encounter anymore is usualy updating perl) everything else portage handles ahead of time, to prevent the breakages (this is not including packages that don't compile, as that's a whole different thing). |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54237 Location: 56N 3W
|
Posted: Mon Jun 16, 2014 6:31 pm Post subject: |
|
|
FaeLLe,
--with-bdeps=n will remove packages only needed to build other packages.
This is probably a waste as they will be reinstalled next time they are needed, for example, as you update. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
FaeLLe n00b
Joined: 13 Aug 2007 Posts: 13 Location: London
|
Posted: Tue Jun 17, 2014 7:04 am Post subject: |
|
|
Thanks everyone |
|
Back to top |
|
|
|