LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices

Reply
 
Search this Thread
Old 03-25-2008, 06:17 PM   #1
mikieboy
Member
 
Registered: Apr 2004
Location: Warrington, Cheshire, UK
Distribution: Linux Mint 12 LXDE
Posts: 555

Rep: Reputation: 33
root partition is getting big


I have 11Gb allocated for my / partition, 1Gb /swap and another 20Gb for /home.
I have just noticed that my / has grown to about 10Gb currently. Since this system was originally a standard Sarge desktop install (I think about 5Gb in /) and I have only added a few extra packages such as Amarok and Kmymoney, I don't know why / has grown so large. At this rate I am in danger of running out of space.
Any suggestions as to the cause or what I might do about this?
 
Old 03-25-2008, 06:19 PM   #2
pljvaldez
Guru
 
Registered: Dec 2005
Location: Somewhere on the String
Distribution: Debian Squeeze (x86)
Posts: 6,092

Rep: Reputation: 269Reputation: 269Reputation: 269
aptitude clean
 
Old 03-25-2008, 06:22 PM   #3
pljvaldez
Guru
 
Registered: Dec 2005
Location: Somewhere on the String
Distribution: Debian Squeeze (x86)
Posts: 6,092

Rep: Reputation: 269Reputation: 269Reputation: 269
Also, you can do a df -h to see what directories are eating up all the space. And then use du -h to find specific files.

EDIT: Here's a link to some find command parameters to help you track down large files and directories.

Last edited by pljvaldez; 03-25-2008 at 06:25 PM.
 
Old 03-25-2008, 06:25 PM   #4
slackhack
Senior Member
 
Registered: Jun 2004
Distribution: Arch, Debian, Slack
Posts: 1,016

Rep: Reputation: 46
so you mean your partition is actually getting too small. j/k

check your /var/log directory too, if it's on your / partition. maybe something is out of whack and some big files are building up.
 
Old 03-25-2008, 06:36 PM   #5
BrianK
Senior Member
 
Registered: Mar 2002
Location: Los Angeles, CA
Distribution: Debian, Ubuntu
Posts: 1,334

Rep: Reputation: 51
a suggestion:

cd /
du -h --max-depth=1

find the biggest dir, cd into it, re-run the du command "!du".

repeat until you find the offensive files/directories, then do something about them.
 
Old 03-25-2008, 06:54 PM   #6
mikieboy
Member
 
Registered: Apr 2004
Location: Warrington, Cheshire, UK
Distribution: Linux Mint 12 LXDE
Posts: 555

Original Poster
Rep: Reputation: 33
@ pljvaldez:

I didn't know about "aptitude clean".
I ran that command and I now have 5.1Gb free space in / just like that.

I'll try the other suggestions as well to grab some more space back.

Many, many thanks guys.
 
Old 03-25-2008, 06:57 PM   #7
pljvaldez
Guru
 
Registered: Dec 2005
Location: Somewhere on the String
Distribution: Debian Squeeze (x86)
Posts: 6,092

Rep: Reputation: 269Reputation: 269Reputation: 269
Quote:
Originally Posted by mikieboy View Post
I didn't know about "aptitude clean".
I ran that command and I now have 5.1Gb free space in / just like that.
Basically, whenever you run an upgrade or dist-upgrade, all the packages that get downloaded are stored on your hard drive until you clean them out. So if you've never run clean, it may have been that all the packages from your Etch update were still on the machine.
 
Old 03-25-2008, 07:32 PM   #8
mikieboy
Member
 
Registered: Apr 2004
Location: Warrington, Cheshire, UK
Distribution: Linux Mint 12 LXDE
Posts: 555

Original Poster
Rep: Reputation: 33
Thanks, that'll almost certainly have been the case then.

I've run "df -h" and "du -h --max-depth=1" as suggested and then run "!du" on /var (427M).

The output is:

Quote:
124M ./lib
33M ./cache
12K ./backups
4.0K ./local
4.0K ./lock
243M ./log
224K ./run
188K ./spool
28M ./tmp
4.0K ./opt
16K ./mail
8.0K ./games
128K ./www
427M .
Is there a proper way to clear out ./log? What about ./run and ./spool?
 
Old 03-25-2008, 08:09 PM   #9
BrianK
Senior Member
 
Registered: Mar 2002
Location: Los Angeles, CA
Distribution: Debian, Ubuntu
Posts: 1,334

Rep: Reputation: 51
Quote:
Originally Posted by mikieboy View Post
Thanks, that'll almost certainly have been the case then.

I've run "df -h" and "du -h --max-depth=1" as suggested and then run "!du" on /var (427M).

The output is:


Is there a proper way to clear out ./log? What about ./run and ./spool?
you don't want to mess with run.
spool contains mails, probably also not something to mess with directly.
(besides both together only amount to less than 1 MB).

- in log, you can remove all of the gzipped files.
- you can also echo "" > some_file to clear any large logs, though that's probably not necessary after removing the gz files.
- to properly manage your log files, you should have logrotate working. I've never put much effort into this, so I can't help you with it.

btw, I didn't know about aptitude clean either. good tip!
 
Old 03-25-2008, 11:02 PM   #10
farslayer
Guru
 
Registered: Oct 2005
Location: Willoughby, Ohio
Distribution: linuxdebian
Posts: 7,228
Blog Entries: 5

Rep: Reputation: 189Reputation: 189
I use localepurge to help keep the space in check..

No reason to have man pages in 50 languages when you only refer to one... localepurge automagically gets rid of the man pages you don't need.
 
  


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
LXer: Why Big Compute and Big Storage will meet Big Pipe at the Last Mile LXer Syndicated Linux News 0 12-23-2007 01:20 PM
How big is your Linux partition? exit3219 General 28 02-27-2006 11:05 AM
How Big Should the Partition Sizes Be? TGWDNGHN Linux - Newbie 7 06-27-2005 08:26 PM
Big partition problem... CountZero16 Linux - General 6 11-18-2004 03:15 PM
Root partition for FC3: how big? Kropotkin Fedora 1 10-31-2004 12:19 PM


All times are GMT -5. The time now is 07:10 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