idea comes from mepislovers but thought it would be of more interest to antiX users - where HD space might be more limited and every mb matters __{{emoticon}}__
basically
#!/bin/bash
cd /thedirectorywithfilesthatcanbedeleted
rm -r thefileswewanttodelete.files
exit
im hesistant to script it due to not knowing exactly how safe it is to remove cetain files:
heres a few directories that im pretty sure could be included
/home/username/.thumbnails
/var/log (i know mepis tools can deal with this somewhat) - kernlog, syslog, and messages are all about 100mb each for me
/var/apt/cache -- does one really need to keep all the deb files?? surely
various cache directories for browsers and email apps
the livecd related files/packages that come with the antiX install
im sure i could gain abouot 1gb if i cleaned up
can we come up with a list of files that can definitely be deleted safely, script it, then give users the option to remove it if they want - and do it periodically for files that recreate themselves
topic title: clean up script???
6 posts
• Page 1 of 1
-
Posts: 19
- Joined: 15 Jul 2008
-
Posts: 1,520
- Joined: 07 Oct 2007
#2
The smxi script will take care of most of this for you. especially old debs and logs as well as backups. you can even remove unused kernel which take up a lot of space.
-
Posts: 19
- Joined: 15 Jul 2008
#3
i know smxi does the packages and has kernel remover
wasnt aware it was doing anything with logs (or just forgot)
and im pretty sure it doesnt touch thumbnails or cache... or maybe other files out there lurking and growing
wasnt aware it was doing anything with logs (or just forgot)
and im pretty sure it doesnt touch thumbnails or cache... or maybe other files out there lurking and growing
-
Posts: 1,139
- Joined: 26 Apr 2008
#4
smxi does have facilities to clean the apt cache, and that can grow significantly with a lot of package updates.
-
anticapitalista
Posts: 5,955
- Site Admin
- Joined: 11 Sep 2007
#5
I like the idea iamclueless.
As others have said, smxi can clean up, but AFAIK you still have to do this out of X (which I don't think is necessary). It would be nice if smxi could do this in X.
Other files that users may want to clean/remove are in /usr/share/doc /usr/share/info
As others have said, smxi can clean up, but AFAIK you still have to do this out of X (which I don't think is necessary). It would be nice if smxi could do this in X.
Other files that users may want to clean/remove are in /usr/share/doc /usr/share/info
-
Posts: 19
- Joined: 15 Jul 2008
#6
ok heres candidates for removal :
/home/username/.thumbnails/normal
/home/username/.thumbnails/large
/home/username/.mozilla/firefox/qypx8ukz.default/Cache (but im not sure about the subdir name qypx8ukz.default... would be different for different users... i assume thuderbird would have something similar)
/home/username/.opera/cache4 (for those with opera)
/home/username/.local/share/Trash (i got back 1.2 gb on this one)
/usr/share/doc (can all of it go?)
/usr/share/info (can all of it go?)
/var/log (im not sure what can go)
/tmp (should empty every boot right?? but it apparently sometmes doesnt.. again i assume all of it can go)
/var/cache/apt/archives (i know clean and autoclean can manage it. a potential lifesaver when something breaks and you need an older deb, but you could grab it from debian snapshot correct?)
/home/username/.macromedia/Flash_Player (read somewhere that this can go)
the liveCD and installation parts... where are they?? hehe
i suppose .bak and .tmp througout the entire system could also be thrown in there.
configuration files for removed progs (i know there a 1 line terminal command for it)
other parts from smxi could be borrowed (autoclean, clean, localepurge)
open to more ideas
autoremove and deborphan /orphaner- ive read too many cautions about them that makes me hesitant to think automating it is a good thing __{{emoticon}}__
so something like:
if the dir exists run that part of the script
echo"info about the files in questions. do you want to delete"
if yes delete
else run the next part of script
and so on
/home/username/.thumbnails/normal
/home/username/.thumbnails/large
/home/username/.mozilla/firefox/qypx8ukz.default/Cache (but im not sure about the subdir name qypx8ukz.default... would be different for different users... i assume thuderbird would have something similar)
/home/username/.opera/cache4 (for those with opera)
/home/username/.local/share/Trash (i got back 1.2 gb on this one)
/usr/share/doc (can all of it go?)
/usr/share/info (can all of it go?)
/var/log (im not sure what can go)
/tmp (should empty every boot right?? but it apparently sometmes doesnt.. again i assume all of it can go)
/var/cache/apt/archives (i know clean and autoclean can manage it. a potential lifesaver when something breaks and you need an older deb, but you could grab it from debian snapshot correct?)
/home/username/.macromedia/Flash_Player (read somewhere that this can go)
the liveCD and installation parts... where are they?? hehe
i suppose .bak and .tmp througout the entire system could also be thrown in there.
configuration files for removed progs (i know there a 1 line terminal command for it)
other parts from smxi could be borrowed (autoclean, clean, localepurge)
open to more ideas
autoremove and deborphan /orphaner- ive read too many cautions about them that makes me hesitant to think automating it is a good thing __{{emoticon}}__
so something like:
if the dir exists run that part of the script
echo"info about the files in questions. do you want to delete"
if yes delete
else run the next part of script
and so on