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

Re: Cleaning Up Alternatives



On Tuesday 22 May 2007, debian-user-digest-request@lists.debian.org wrote:
> On Tue, 22 May 2007, David Baron <d_baron@012.net.il> wrote:
> > /etc/alternatives has a zillion dangling symlinks. Seems these got set
> > somewhere along the line but were never cleaned up as programs were
> > moved, upgraded, removed.
> >
> > How does one clean up this mess conveniently?
>
> If these leftovers are due to packages removed but not purged, this
> will tell you:
>     grep -B1 "Status: deinstall ok config-files" /var/lib/dpkg/status \
>         | grep "Pac" | cut -d" " -f2
> and
>     for f in $( the above line ); do dpkg -P $f; done
> will clean up.

The most scary thing I ever ran, I think. But what it is taking off is config 
files for: KDE (I have a locally compiled one!), realtime-lsm-modules for 
since superceded kernels, xserver-common for xfree86! and a bunch of libs 
(which if it does damage, I can reinstall them but I assume this means I 
removed them previously) and some older kernel images long since removed. So 
I guess its ok.

However, this is not stuff that was listed in the alternatives. So I will have 
a look at symlink and croft. I do not know how much I actually use 
alternatives and I myself have not been maintaining it.



Reply to: