[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: How to disk cleanup after apt-get upgrade/install/remove cycles?



On 2004-01-14, Ramasubramanian Ramesh penned:
> All,
>
>  Often one is not sure of the choices and strength of
>  packages/utilities and tend to install multiple utilies for the same
>  purpose. For example I have about 3 or 4 cd players and assortment of
>  mp3 palyers etc. Sooner or later you see that a lot of left over
>  packages exists in your system that you no longer use.
>
> I am wondering if there is a fool-proof way of cleaning up that
> eliminates all unused packages.  Specifically, if I installed package
> A that brought in packages B C and D due dependencies. Is there a way
> to find out that B C and D are no longer in the dependency list of any
> packages after removal of say A. This will allow me to systematically
> remove all unwanted packages.
>
> My naive approach now is
>
>    1. do a get-selection to see installed packages 2. mark the ones
>    that you do not need 3. try apt-get -s remove them to see if any
>    thing else gets removed.  4. Based on above output prune the list
>    down so that step 3 produces expected results.  5. Go ahead with
>    the actual removal
>
> Are there any better methods? In particular is there a method to
> draw/list a directed graph of dependencies of pacages in the current
> debian installation?  (or for that matter, do the dependencies form a
> digraph?)
>

If you use aptitude, it automatically tracks dependencies and uninstalls
them when you uninstall the primary package.  This saved my bacon a few
weeks ago, when a package "suggested" the whole X environment and I
accidentally installed it all ... ugh!

There's also a tool called deborphan:

       deborphan  finds  packages that have no packages depending on them. The
       default operation is to search only within the libs  and  oldlibs  sec-
       tions to hunt down unused libraries.

-- 
monique



Reply to: