Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Filesystem cruft script: clean your system, save disk space!
View unanswered posts
View posts from last 24 hours

Goto page Previous  1, 2, 3, 4, 5, 6, 7, 8, 9, 10  Next  
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks
View previous topic :: View next topic  
Author Message
ecatmur
Advocate
Advocate


Joined: 20 Oct 2003
Posts: 3595
Location: Edinburgh

PostPosted: Tue Apr 13, 2004 11:43 pm    Post subject: Reply with quote

Well, I don't use webmin or usermin so I can't help much with those, although if you post a stanza to list relevant files I will be happy to add it in.

On the upside, I've just added X.org and ruby support.
Back to top
View user's profile Send private message
manywele
l33t
l33t


Joined: 12 Jul 2003
Posts: 739
Location: Inside

PostPosted: Wed Apr 14, 2004 12:03 am    Post subject: Reply with quote

To list some of the stuff it's finding:
Code:
/var/www/localhost/htdocs/squirrelmail/data
/var/www/localhost/htdocs/<stuff I added>
/var/spool/postfix
/var/log/*
/usr/share/xplanet/<lots of stuff>
/etc/postfix
/etc/pam.d
/etc/ddclient
/etc/apache2/<keys>
/usr/libexec/webmin
/var/webmin
~/.maildir (my mail isn't cruft!)

16041 files. Some of it is cruft (mostly stuff in /usr/share/doc and /usr/share/man) but most of it isn't.
Back to top
View user's profile Send private message
ecatmur
Advocate
Advocate


Joined: 20 Oct 2003
Posts: 3595
Location: Edinburgh

PostPosted: Wed Apr 14, 2004 1:25 am    Post subject: Reply with quote

Added /var/www.
/var/log is managed per-package.
/usr/share/xplanet is handled fine on my machine - have you added some files?
/var/spool/postfix, /etc/postfix are in the ebuild, -r2 at least.
Plenty of ebuilds install into /etc/pam.d.
For /etc/ddclient I need to know what the conf files are called.
Is there a way to know what the /etc/apache2/<keys> files are?
/var/webmin is excluded already - are you sure webmin is installed via Portage?
/home is excluded, so no idea why ~/.maildir would be listed.
_________________
No more cruft
dep: Revdeps that work
Using command-line ACCEPT_KEYWORDS?
Back to top
View user's profile Send private message
manywele
l33t
l33t


Joined: 12 Jul 2003
Posts: 739
Location: Inside

PostPosted: Wed Apr 14, 2004 2:05 am    Post subject: Reply with quote

ecatmur wrote:
Added /var/www.
/var/log is managed per-package.
/usr/share/xplanet is handled fine on my machine - have you added some files?
/var/spool/postfix, /etc/postfix are in the ebuild, -r2 at least.
Plenty of ebuilds install into /etc/pam.d.
For /etc/ddclient I need to know what the conf files are called.
Is there a way to know what the /etc/apache2/<keys> files are?
/var/webmin is excluded already - are you sure webmin is installed via Portage?
/home is excluded, so no idea why ~/.maildir would be listed.

Code:

/etc/ddclient/{ddclient.cache,ddclient.conf}

/etc/apache2/conf<domain>.key
/etc/apache2/conf/<domain>.key.unsecure
/etc/apache2/conf/<domain>.key.unsecure.csr
/etc/apache2/conf/ssl
/etc/apache2/conf/ssl/server.crt
/etc/apache2/conf/ssl/server.crt.orig
/etc/apache2/conf/ssl/server.key
/etc/apache2/conf/ssl/server.key.orig


Whoops, I had uninstalled webmin/usermin as I wasn't using them so it was actuall cruft. Thanks again! The ~/.maildir is actually /.maildir left over from long ago I believe. Sorry. Need to find out what that's doing there.

Yeah, I guess all the xplanet stuff is addons from the xplanet site (hurricanes, forecast, images, etc.).

I've got postfix-2.0.19 and it's listing 148 postfix files including /etc/postfix/sample/*.

It seems to be listing everything in /var/log including apache, ftpd, telnet, sshd, pwdfail, kernel, everything, critical.

Down to 2289 files now, most of them stuff I've installed myself or stuff I need to look through. Love this script!
Back to top
View user's profile Send private message
gnac
Guru
Guru


Joined: 30 Jun 2003
Posts: 302
Location: Columbia River Gorge

PostPosted: Sat Apr 17, 2004 10:09 pm    Post subject: Reply with quote

having a little problem with your script, which btw I appreciate.

When I try to run it (as root) I get the following error:
Code:
./cruft: line 513: syntax error near unexpected token `&&'
./cruft: line 513: `    && [ -r /usr/share/baselayout/mkdirs.sh ]'


Any thoughts?

Thanks
_________________
"I thought she'd steal my heart, instead she stole my kidney,
and now its for sale, on the black market in Sydney" - Better Abraham
Back to top
View user's profile Send private message
ecatmur
Advocate
Advocate


Joined: 20 Oct 2003
Posts: 3595
Location: Edinburgh

PostPosted: Sat Apr 17, 2004 10:35 pm    Post subject: Reply with quote

Fixed now, thanks.
_________________
No more cruft
dep: Revdeps that work
Using command-line ACCEPT_KEYWORDS?
Back to top
View user's profile Send private message
GaMMa
l33t
l33t


Joined: 23 Aug 2002
Posts: 684
Location: USA

PostPosted: Tue Apr 20, 2004 10:36 pm    Post subject: Reply with quote

Awsome script, I was wondering how to get rid of all my old files for a while now. Things I thought were associated with packages turned out to be cruft. Good job, keep up the good work.
_________________
Ubuntu Linux Dapper Drake running Gnome-2.14.1
[Website | Screenshot | Portage Guide]
Back to top
View user's profile Send private message
brianhearn
n00b
n00b


Joined: 04 Nov 2003
Posts: 72

PostPosted: Wed Apr 21, 2004 8:54 pm    Post subject: Reply with quote

Pretty cool.

It would be nice if it ignored my windows partition which is always mounted... it's listing 30+ GB of cruft under /c. I realise that's a matter of opinion, but the first 37000 lines are from this drive!
Back to top
View user's profile Send private message
ecatmur
Advocate
Advocate


Joined: 20 Oct 2003
Posts: 3595
Location: Edinburgh

PostPosted: Wed Apr 21, 2004 11:03 pm    Post subject: Reply with quote

cruft ignores a number of toplevel directories. e.g. /opt, /mnt and /media. I mount my windows drive as /opt/windows.
_________________
No more cruft
dep: Revdeps that work
Using command-line ACCEPT_KEYWORDS?
Back to top
View user's profile Send private message
GaMMa
l33t
l33t


Joined: 23 Aug 2002
Posts: 684
Location: USA

PostPosted: Thu Apr 22, 2004 12:05 am    Post subject: Reply with quote

Add a line to the script and tell it to ignore that directory. I added a ton of stuff because there are some things I didn't install through portage.
_________________
Ubuntu Linux Dapper Drake running Gnome-2.14.1
[Website | Screenshot | Portage Guide]
Back to top
View user's profile Send private message
GeoffOs
n00b
n00b


Joined: 13 Dec 2003
Posts: 56
Location: Cheshire

PostPosted: Sat Apr 24, 2004 8:11 am    Post subject: Squid Reply with quote

For some reason it seems to be picking up my squid cache?
Edit:
It also picks up /var/lib/setiathome
I have set it to ignore but, could we not pass in an ignore list, that way we can pick up any updates, without loosing our ignore list
_________________
Beyond a critical point within a finite space, freedom diminishes as numbers increase. ...
The human question is not how many can possibly survive within the system, but what kind of existence is possible for those who do survive."
Back to top
View user's profile Send private message
ecatmur
Advocate
Advocate


Joined: 20 Oct 2003
Posts: 3595
Location: Edinburgh

PostPosted: Sat Apr 24, 2004 8:52 am    Post subject: Reply with quote

Added, and added. I'm not going to add support for passing in an ignore list because I want everyone to benefit from new exceptions being added.

"For some reason"... it picks up anything that isn't installed at emerge time (and a few things that are, if the ebuild is kludgy) except stuff in directories that don't belong to a Linux system and auto-cleaned temp directories. /var/cache/squid is in /var/cache, so it would get picked up (but not now, of course).
_________________
No more cruft
dep: Revdeps that work
Using command-line ACCEPT_KEYWORDS?
Back to top
View user's profile Send private message
BudgetDedicated
n00b
n00b


Joined: 26 Apr 2004
Posts: 12
Location: NL

PostPosted: Mon Apr 26, 2004 10:43 pm    Post subject: Reply with quote

Maybe add a notice that it's meant to just generate a link. Normally a user might want to evade any of these scripts... Shouldn't it be promoted as a 'remove candidate list' generator?

Note that to few false positives can result in (barely) careless people removing just 'a few essential files' and still corrupt their system?

Could you add:
/vmlinu.*
/\.*config\*
/System.map
/
Might be pretty important... :wink:

And maybe consider:
/usr/sbin/gcc-config
*/lost+found/
_________________
Grt, Erik
[ My commercial Ad.: Europe's top quality Gentoo VPS provider: BudgetDedicated (starting at 20 euro/month) ]
Back to top
View user's profile Send private message
ecatmur
Advocate
Advocate


Joined: 20 Oct 2003
Posts: 3595
Location: Edinburgh

PostPosted: Tue Apr 27, 2004 12:31 am    Post subject: Reply with quote

BudgetDedicated wrote:
Maybe add a notice that it's meant to just generate a link. Normally a user might want to evade any of these scripts... Shouldn't it be promoted as a 'remove candidate list' generator?

Note that to few false positives can result in (barely) careless people removing just 'a few essential files' and still corrupt their system?
It's version 0.0.4 (version bump!) Anyone who trusts something this primitive doesn't deserve to be an admin...
Quote:

Could you add:
/vmlinu.*
/\.*config\*
/System.map
These should be in /boot.
Quote:

/
Might be pretty important... :wink:
Odd... that should handled already. Can you try again with the latest version?
Quote:

And maybe consider:
/usr/sbin/gcc-config
*/lost+found/
gcc-config is in /usr/bin... which version of gcc-config do you have?
lost+found: OK, it now ignores lost+found for each mountpoint, but still flags files therein. Is this OK?
_________________
No more cruft
dep: Revdeps that work
Using command-line ACCEPT_KEYWORDS?
Back to top
View user's profile Send private message
ecatmur
Advocate
Advocate


Joined: 20 Oct 2003
Posts: 3595
Location: Edinburgh

PostPosted: Thu Apr 29, 2004 12:58 pm    Post subject: Reply with quote

Update: now handles kernel modules (checks for installed linux-sources ebuilds and notes the corresponding directory in /lib/modules) - so now you don't need to worry about remembering to clear out /lib/modules when you update your kernel.
_________________
No more cruft
dep: Revdeps that work
Using command-line ACCEPT_KEYWORDS?
Back to top
View user's profile Send private message
ecatmur
Advocate
Advocate


Joined: 20 Oct 2003
Posts: 3595
Location: Edinburgh

PostPosted: Sat May 01, 2004 4:30 pm    Post subject: Reply with quote

Version 0.0.5.
New packages: xcdroast, acovea, GIMPS, shorewall, acpid.
Now handles /etc/init.d scripts (anything in a runlevel is OK, so now net.* scripts are handled as long as they are in a runlevel).
_________________
No more cruft
dep: Revdeps that work
Using command-line ACCEPT_KEYWORDS?
Back to top
View user's profile Send private message
tom56
Guru
Guru


Joined: 27 Apr 2004
Posts: 325
Location: united kingdom

PostPosted: Sat May 01, 2004 5:04 pm    Post subject: Reply with quote

i read somewhere, though i can't remember where, that this feature is being implemented in emerge soon.
Back to top
View user's profile Send private message
GaMMa
l33t
l33t


Joined: 23 Aug 2002
Posts: 684
Location: USA

PostPosted: Sat May 01, 2004 9:39 pm    Post subject: Reply with quote

I just wanted to say; good work! Keep it up.
_________________
Ubuntu Linux Dapper Drake running Gnome-2.14.1
[Website | Screenshot | Portage Guide]
Back to top
View user's profile Send private message
ecatmur
Advocate
Advocate


Joined: 20 Oct 2003
Posts: 3595
Location: Edinburgh

PostPosted: Mon May 03, 2004 7:03 am    Post subject: Reply with quote

tom56 wrote:
i read somewhere, though i can't remember where, that this feature is being implemented in emerge soon.
Interesting... it'd be nice to get some developer love on this.

Anyway, 0.0.6 now. A few things: some stderr status output; more fine-grained over portage, devfs and udev; and faster package version checking code (written in bash by me, much faster than launching Python each time).
_________________
No more cruft
dep: Revdeps that work
Using command-line ACCEPT_KEYWORDS?
Back to top
View user's profile Send private message
revertex
l33t
l33t


Joined: 23 Apr 2003
Posts: 806

PostPosted: Tue May 04, 2004 7:57 am    Post subject: Reply with quote

nice script, thank's.
but i guess it's a false positive


Code:

/usr/share/wallpapers/
/usr/share/wine/
/usr/share/xine/skins/
/usr/share/xmms/Skins/
/var/lib/nessus/
/var/lib/ntop/
Back to top
View user's profile Send private message
ecatmur
Advocate
Advocate


Joined: 20 Oct 2003
Posts: 3595
Location: Edinburgh

PostPosted: Tue May 04, 2004 12:22 pm    Post subject: Reply with quote

What does /usr/share/wallpapers belong to? If it's yours then it should be in /usr/local.

Is /usr/share/wine your fake windows drive? You'd be better off moving it to /opt/winedrive, or at least /usr/local/share/wine.

Xine: nope, not adding that. Put skins in ~/.xine.

For xmms:
Quote:
# Add /usr/local/share/xmms/Skins to the search path for skins
epatch ${PATCHDIR}/${P}-fhs-skinsdir.patch


OK, added nessus and ntop.
_________________
No more cruft
dep: Revdeps that work
Using command-line ACCEPT_KEYWORDS?
Back to top
View user's profile Send private message
ecatmur
Advocate
Advocate


Joined: 20 Oct 2003
Posts: 3595
Location: Edinburgh

PostPosted: Tue May 04, 2004 12:24 pm    Post subject: Reply with quote

Actually, better would be a xine-themes ebuild. I just posted one, see https://bugs.gentoo.org/show_bug.cgi?id=49959 - hopefully it will be added to Portage soon.

Hmmm... wonder who'll get the 50000th Gentoo bug? Quite a milestone... :D
_________________
No more cruft
dep: Revdeps that work
Using command-line ACCEPT_KEYWORDS?
Back to top
View user's profile Send private message
revertex
l33t
l33t


Joined: 23 Apr 2003
Posts: 806

PostPosted: Tue May 04, 2004 6:00 pm    Post subject: Reply with quote

huh, i just put some wallpapers there to de system wide, wrong place at all :oops:
I need to do a better use of /usr/local (sorry, i'm a n00b, still learning)
Back to top
View user's profile Send private message
trevorj
n00b
n00b


Joined: 13 May 2003
Posts: 68

PostPosted: Wed May 05, 2004 7:04 am    Post subject: ccache Reply with quote

If you use ccache, EVERY file in /var/tmp/ccache shows up ( 3000+ ), and I wouldn't consider that cruft =)
_________________
\\ trevorj
Back to top
View user's profile Send private message
ecatmur
Advocate
Advocate


Joined: 20 Oct 2003
Posts: 3595
Location: Edinburgh

PostPosted: Wed May 05, 2004 10:26 am    Post subject: Reply with quote

Oh yeah, good catch. Thanks - fixed now.
_________________
No more cruft
dep: Revdeps that work
Using command-line ACCEPT_KEYWORDS?
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks All times are GMT
Goto page Previous  1, 2, 3, 4, 5, 6, 7, 8, 9, 10  Next
Page 2 of 10

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum