Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[HOWTO] Cleaning Cruft from a Gentoo System
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks
View previous topic :: View next topic  
Author Message
rrowv
n00b
n00b


Joined: 17 Mar 2005
Posts: 16

PostPosted: Thu Jul 21, 2005 9:31 pm    Post subject: [HOWTO] Cleaning Cruft from a Gentoo System Reply with quote

I made a small guide that compiles some of the best ways I'm aware of to get rid of unwanted/unused/cruft files. I give techniques that range from novice-friendly to expert-only. I know there are some scripts out there (like ecatmur's and findcruft) that serve this purpose, but they are outdated. I figured it would be more useful to just post some techniques to use than give everyone a script. You can learn more this way too, and have more control.

Cleaning Cruft from a Gentoo System

Post or PM any comments you have. I could use suggestions on style, usability, content, and accuracy. Suggetsions on other techniques, or better ways to do the ones I have would be great. If you see anything incorrect or dangerous please let me know.

Edit: added .txt, .sxw for survey.
Edit: removed survey, no longer needed. (7/26)


Last edited by rrowv on Tue Jul 26, 2005 9:48 pm; edited 3 times in total
Back to top
View user's profile Send private message
Ctrl+Alt+Del
Guru
Guru


Joined: 04 Jul 2004
Posts: 326
Location: .de

PostPosted: Thu Jul 21, 2005 9:53 pm    Post subject: Reply with quote

Nice one :)
will sure come in handy.
One question about removing kernel sources: wouldn't it be better to emerge unmerge =sys-kernel/gentoo-sources-2.x.xx so the package gets removed from world as well?
edit: the survey is a MS Office .doc?? 8O
Back to top
View user's profile Send private message
rrowv
n00b
n00b


Joined: 17 Mar 2005
Posts: 16

PostPosted: Thu Jul 21, 2005 11:13 pm    Post subject: Reply with quote

Ctrl+Alt+Del wrote:

One question about removing kernel sources: wouldn't it be better to emerge unmerge =sys-kernel/gentoo-sources-2.x.xx so the package gets removed from world as well?

Yup, don't know why I forgot about that, will change it in a bit. (Edit: fixed now, tell me what you think)

I added different formats for the survey (.txt, .sxw).

Edit: I also fixed a bunch of other things people messaged me about.


Last edited by rrowv on Tue Jul 26, 2005 5:11 am; edited 1 time in total
Back to top
View user's profile Send private message
kommissar
Tux's lil' helper
Tux's lil' helper


Joined: 19 May 2005
Posts: 78

PostPosted: Fri Jul 22, 2005 2:38 am    Post subject: Reply with quote

I like it, a great idea you have. Unfortunately the find command you listed in one of the latest sections does not do the trick. As you can see below, the files with *gconf* in the path are still included in the find. Here is what I mean:
Code:
server etc # for n in `find /etc/* -type f -not -name .keep -not -path *gconf*`;do if [[ `qpkg -f $n` = "" ]]; then echo $n; fi; done
/etc/X11/app-defaults/XScreenSaver
/etc/adjtime
/etc/apache2/conf/ssl/server.crt
/etc/apache2/conf/ssl/server.key
...
/etc/env.d/01hostname
/etc/fstab
/etc/gconf/gconf.xml.defaults/apps/eog/ui/%gconf.xml
/etc/gconf/gconf.xml.defaults/apps/eog/view/%gconf.xml
/etc/gconf/gconf.xml.defaults/apps/eog/full_screen/%gconf.xml
/etc/gconf/gconf.xml.defaults/apps/eog/window/%gconf.xml
/etc/gconf/gconf.xml.defaults/apps/eog/%gconf.xml
/etc/gconf/gconf.xml.defaults/apps/ggv/control/%gconf.xml
/etc/gconf/gconf.xml.defaults/apps/ggv/gtkgs/%gconf.xml
/etc/gconf/gconf.xml.defaults/apps/ggv/layout/%gconf.xml
Back to top
View user's profile Send private message
lynxnyl
Apprentice
Apprentice


Joined: 15 Aug 2004
Posts: 253
Location: Ljubljana, Slovenija

PostPosted: Fri Jul 22, 2005 10:36 am    Post subject: Reply with quote

The site has a default background, which comes out as blue here, completely ruining the impression. Try hardcoding it.

kommissar it works for me.:?

rm /*~ #are you sure this would expand properly?
rm /*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*~ # to be sure :lol:
find / -regex '.*~' -exec rm '{}' \; # the proper way

find / -regex '.*core\.[0-9]*' -exec rm '{}' \; #for cleaning out core files
Back to top
View user's profile Send private message
rrowv
n00b
n00b


Joined: 17 Mar 2005
Posts: 16

PostPosted: Fri Jul 22, 2005 4:56 pm    Post subject: Reply with quote

kommissar: I cannot reproduce your problem, what version of find do you have? I may switch to something more like a script if this is a common (maybe find's boolean expressions are flakey).

lynxnyl: I hardcoded the background. What browser are you using? (so I can test this better)
Also about the `rm -rf *~`, it does expand properly (I tested it), but I dont like it. It makes me nervous. I think I'l use your way instead. And thanks for the suggestions about core files.
Back to top
View user's profile Send private message
lynxnyl
Apprentice
Apprentice


Joined: 15 Aug 2004
Posts: 253
Location: Ljubljana, Slovenija

PostPosted: Fri Jul 22, 2005 5:04 pm    Post subject: Reply with quote

opera, with background color set to blue. I guess this overrides it, but I don't know how to fix it - not many sites have problems with this.

echo *~ # doesn't expand properly for me, while the long one does. The find method is much better though.
Back to top
View user's profile Send private message
rrowv
n00b
n00b


Joined: 17 Mar 2005
Posts: 16

PostPosted: Sat Jul 23, 2005 2:00 am    Post subject: Reply with quote

The background should be white now (I hardcoded it in css just now).

I agree, using find is much better. I switched that step to use find instead, and added the section about core dumps you suggested. Thanks all for your comments so far.

I'm working on redoing the /etc cleaning part, probably with a simple script that has common things (like /etc/fstab) to exclude. Nothing fancy, just enough to clean out the output some.
Back to top
View user's profile Send private message
lynxnyl
Apprentice
Apprentice


Joined: 15 Aug 2004
Posts: 253
Location: Ljubljana, Slovenija

PostPosted: Sat Jul 23, 2005 7:30 am    Post subject: Reply with quote

Yup, it works. :)
Back to top
View user's profile Send private message
bits'n'booze
n00b
n00b


Joined: 19 May 2004
Posts: 25
Location: Germany

PostPosted: Sun Jul 16, 2006 3:51 pm    Post subject: Reply with quote

The link to the manual (mentioned in the first post) is dead.
I'd be interested to know what was in there, so if anybody has a copy or if the original poster reads this, please post a working link or just post it here.

Thx
_________________
---
Adopt an unanswered post today!
Back to top
View user's profile Send private message
gentoo_lan
l33t
l33t


Joined: 08 Sep 2004
Posts: 890
Location: Charles Town, WV

PostPosted: Sun Jul 16, 2006 6:17 pm    Post subject: Reply with quote

Yes I would be interested in the manual also. Thanks for your time.
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
Page 1 of 1

 
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