LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 07-15-2004, 07:34 PM   #1
bionicyeti
LQ Newbie
 
Registered: Jul 2004
Location: Ann Arbor area
Distribution: debian
Posts: 11

Rep: Reputation: 0
Unhappy Disk Cleanup


Thank in advance for any help.

I'm running Debian. The "testing" version. My 2 gig harddrive is 100% full. I'm currently out of town so only have access via ssh. Are there any command line automatic disk cleanup utilities? Kind of what you would do in windows??? Hopefully no one replies rm * Thanks again.
 
Old 07-15-2004, 08:36 PM   #2
jailbait
Guru
 
Registered: Feb 2003
Location: Blue Ridge Mountain
Distribution: Debian Wheezy, Debian Jessie
Posts: 7,536

Rep: Reputation: 178Reputation: 178
"I'm running Debian. The "testing" version. My 2 gig harddrive is 100% full. I'm currently out of town so only have access via ssh. Are there any command line automatic disk cleanup utilities? Kind of what you would do in windows??? Hopefully no one replies rm *"

I do this sort of cleanup with a script that issues various rm commands. I use cron to run this script in the background once a week. You pretty much have to customize a cleanup script to your own system. For example if you wanted to get rid of all of the backup files in your system you could use:

cd /
rm *.bak -R
rm *.old -R
rm *.~ -R

You can go after the trash with:
rm /root/Desktop/Trash/* -R
rm /home/user/Desktop/Trash/* -R

You can also remove all files from certain application directories that tend to collect a lot of garbage like your web browser cache and the Gnucash log files. Check all of your applications to see if they create unnecessary backup files or log files. Then turn off the unnecessary files or delete them in a script.

Aside from deleting files you can cut down on hard drive usage by not accumulating trash in the first place. Set your web browser to delete old cache entries every day. Set up logrotate so that you only keep the log files two deep and rotate every day or two.

___________________________________
Be prepared. Create a LifeBoat CD.
http://users.rcn.com/srstites/LifeBo...home.page.html

Steve Stites

Last edited by jailbait; 07-15-2004 at 08:38 PM.
 
Old 07-16-2004, 08:51 AM   #3
bionicyeti
LQ Newbie
 
Registered: Jul 2004
Location: Ann Arbor area
Distribution: debian
Posts: 11

Original Poster
Rep: Reputation: 0
Thanks for the response jailbait.

In my case, this is just a webserver. I don't backup anything, and do no web browsing or any work of any kind on the thing for that matter. But I did find the perfect solution to the problem.

For Debian users only, I'm assuming, the apt-get clean command knocked it down from 100% to 60% full in about 20 seconds. I guess this command deletes all .deb packages from the drive. I'm assuming this would only be a problem if i needed to reinstall a package. We'll see.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Bookmark cleanup MBH LQ Suggestions & Feedback 2 05-19-2006 09:39 AM
Disk Cleanup type thing? IanPappas Mandriva 1 10-05-2005 06:01 PM
disk cleanup ahimsel08 Linux - Software 1 06-25-2004 12:08 AM
log cleanup script teacup Programming 2 09-24-2003 11:32 AM
/tmp cleanup Stephanie Linux - General 2 07-27-2001 03:17 PM


All times are GMT -5. The time now is 11:29 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration