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

Re: Cruft -- find any leftover files on your system



On Mon, Apr 06, 1998 at 03:29:41AM +1000, Anthony Towns wrote:
> Hello world,
> 
> I felt like doing some scripting over the weekend, and managed
> to come up with "cruft", version 0.9 of which is available from
> http://va.debian.org/~ajt/ in i386 .deb format, or as deb-source. 
> 

[snipout some presentations]

> 	dpkg's database
> 	the alternatives database
> 	user's home directories
> 	rc.d scripts
> 	lost+found files
> 	/usr/local files
> 	/home/ftp files
> 
> (and then goes ahead and just accepts everything in /dev, /etc, /usr/src,
> and /var/www because I couldn't think of good ways to determine what
> should be in them :( )
> 

There also lot's of stuff in /var/spool /var/cache and /var/log, not?

> It's also possible to add local "explanations" for files, for example
> my system has an unpack-the-tgz installation of a program called "possum"
> in /home/possum, so I've added a short script that produces a list of
> all those files in /usr/local/lib/cruft/explain/possum, which cruft
> automatically includes in its considerations.
> 

Call it a Good Thing <TM> :)

> 
> I'd appreciate it if some of you kind folks would be willing to have a
> look through it and perhaps run it over your system and if you can 
> either give me some procedures for making sense of a few more files that
> are left lying around on your system; or suggestions on improving the
> output format.

I'll do, for sure...

> I'd _really_ like some way of working out what stuff should be in /etc,
> and what stuff shouldn't, but a number of the files in there are made
> in postinsts and I couldn't come up with a nice way of dealing with that.

What about a dpkg service who looks like that:
dpkg --add-file [--package <package>] <files...>
and can be call from post-inst?

This can go from a simple 'echo <files...> > /var/lib/dpkg/info/<package-name>.lists'
to a more checkfull options with conflict checking. I think it can be better than
all this {mkdir,rmdir} /usr/local/.. stuff in post-{inst,rm} and add control to the
system, especially if we can have a special local.list to avoid dpkg overwriting local
files. 
[This not help for Contents.gz but are better than an other Conffiles like field in
 the control]

IMHO, dpkg --remove-file [--package <package>] <files...> will only be useful with
the local pseudo package of dpkg

Just my 2c. Seems really good works...

> 
> Cheers,
> aj
> 

Fab.

-- 
------------------------------------------------------------------------
Fabien Ninoles
E-mail: fab@tzone.org
WebPage: http://www.callisto.si.usherb.ca/~94246757
You can get my public key from your nearest public keys server!
RSA PGP KEY [E3723845]: 1C C1 4F A6 EE E5 4D 99  4F 80 2D 2D 1F 85 C1 70
------------------------------------------------------------------------

Attachment: pgpkuiOvBtwT7.pgp
Description: PGP signature


Reply to: