Fedora Linux Support Community & Resources Center

Go Back   FedoraForum.org > Fedora 17/18 > Using Fedora
FedoraForum Search

Forgot Password? Join Us!

Using Fedora General support for current versions. Ask questions about Fedora and it's software that do not belong in any other forum.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 17th October 2007, 12:22 AM
thesun Offline
Registered User
 
Join Date: Jun 2004
Posts: 518
How to free up disk space?

Okay, somehow my hard disk is at 100 percent full, causing mayhem: lock files aren't getting removed, certain apps don't run...gack. I'd like to delete any caches or temp files that are large enough to give me a wee bit of room...what can safely be deleted? Is there a way to list the top 50 largest files on my system so I can look for a nice 10GB fattie that can be dropped first? I am thinking var or tmp might be a good place to start?
Reply With Quote
  #2  
Old 17th October 2007, 01:10 AM
daverj Offline
Registered User
 
Join Date: Jan 2006
Location: Denver, CO USA
Posts: 670
It depends on your filesystem layout. If you have different partitions you can limit your search to that particular partition. If everything is under / then everything is fair game. To find the disk hogs, start with using the du command:
Code:
du -sk *
that will give you the disk usage for everything from the current directory on down. You can then start narrowing things down by directory. If you want to find the largest files on your system, use the find command with the -size option. See the manpage for details. A simple one-liner I always use is:
Code:
find . -type f -exec ls -l '{}' \; | awk '{print $5, $NF}' | sort -n | tail -10
this will find the 10 largest files from your current directory on down. You can always change the tail value. Beware though, large files are not always the problem. Sometimes its just a bunch of little files.

davidj
Reply With Quote
  #3  
Old 17th October 2007, 01:40 AM
brunson Offline
Registered User
 
Join Date: Jun 2005
Location: Westminster, Colorado
Posts: 2,304
I'm a big fan of baobab, I like the radial display of the filesystem sizes. It's installable via yum.
__________________
Registered Linux User #4837
411th in line to get sued by Micro$oft
Quote:
Basically, to learn Unix you learn to understand and apply a small set of key ideas and achieve expertise by expanding both the set of ideas and your ability to apply them - Paul Murphy
Reply With Quote
  #4  
Old 17th October 2007, 04:37 PM
William Haller Offline
Registered User
 
Join Date: Jul 2005
Age: 52
Posts: 1,013
Take a quick look in /var/log. These files are log files that are created in real time with information about what is happening in the system. They are generally archived once per week creating backup files. These may or may not be compressed. In an emergency, move old ones (ending in a .1, .2 or .1.gz, .2.gz and so forth) to a CD if you need to keep them or remove them completely.

If running squid, shut it down and cd /var/spool/squid. as root - being sure you are really in /var/spool/squid, do a rm -rf *. Then restart squid. Again. Be really, really sure you are in /var/spool/squid before doing a recursive remove.

Do a yum clean all just in case you have it set to save downloaded packages.

Take a look in /var/spool/mail/archive, or similar, depending on your setup and see if you have a huge archive of root mail messages that could be gone through and removed.

If you ever write files to /dev/null, check in /dev for non-device files that you may have accidentally created.

Drop your system down to single user, non-graphical, and cd /tmp. Remove files in there that may have accumulated over time and then restart. Check /var/tmp as well.

Go into your browser and clean all browser caches.

That's a quick list of some basic housekeeping you could do.
Reply With Quote
  #5  
Old 20th October 2007, 12:12 PM
glennzo's Avatar
glennzo Online
Un-Retired Administrator
 
Join Date: Mar 2004
Location: Salem, Mass USA
Posts: 13,930
Some great info here! I had issues with the 10GB partition that Fedora 8 Test 3 is installed on being 90% used. I didn't like that so I started investigating. I searched the forum and found this post. As a result my disk usage is at 48% now.. That's great! Thanks, everyone, for this valuable info!
__________________
Glenn
The Bassinator © ®


Laptop: Toshiba Satellite / Intel Core 2 Duo 1.73 GHz / 2GB / 160GB / Intel Mobile 945GM/GMS/GME/943/940GML Integrated Graphics
Desktop: BioStar MCP6PB M2+ / AMD Phenom 9750 Quad Core / 4GB / 1TB SATA / 500GB SATA / EVGA GeForce 8400 GS 1GB
Reply With Quote
Reply

Tags
disk, free, space

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
running low, free up disk space joop Using Fedora 5 11th November 2008 11:44 PM
Hard disk -- Free space not equal to available space ?? michaeleekk Hardware & Laptops 2 30th August 2006 02:20 PM
Removing s/w to free disk space Andy F Using Fedora 2 21st October 2005 05:15 PM


Current GMT-time: 12:02 (Thursday, 23-05-2013)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat