The best way to keep the system clean?

Mel fbsd.questions at rachie.is-a-geek.net
Mon Sep 24 06:10:41 PDT 2007


On Monday 24 September 2007 14:50:20 Robert Huff wrote:
> Wojciech Puchar writes:
> >  > My problem, many times I install some software from ports, it install
> >  > the dependency software. Then after some time, I find that software
> >  > isn't what I want, and deinstall it. At this point, the dependency
> >  > software isn't necessary as well. Is there a way to clean them
> >  > automatically, like the apt-get autoremove in the Ubuntu system.
> >
> >  possibly there are better methods but i do:
>
> 	Also: ports-mgt/pkg_cutleaves.
> 	Personally, I distrust anything involving the term
> "autoatically remove", doubly so when it involves recursion.  All it
> takes is one bug in the script, or fumble-fingers at the keyboard,
> and you're looking at major re-installation.  This is a job for the
> Mk. I eyeball.


pkg_cutleaves works interactively by default and can be aborted at any time. 
I'm of the same mindset, still pkg_cutleaves does it's job very well:
- Reads config file of leaves to keep, so you don't have to answer the same 
questions on each run
- Builds a list of current leaves, asks you whether to deinstall and *then* 
deinstalls those leaves (not between each answer - fumble finger protection!)
- Gives the option re-evaluate leaves after a run, so you can optionally 
remove dependencies of deinstalled packages (recursive, yet not recursive).

I typically run it as pkg_cutleaves -xg, so that new "Kept" packages are added 
to the config file automatically.
-- 
Mel


More information about the freebsd-questions mailing list