SEARCH

Enter your search query in the box above ^, or use the forum search tool.

You are not logged in.

#1 2010-06-05 09:05:38

MartinRF
#! Junkie
From: Stockholm, Sweden
Registered: 2009-01-23
Posts: 359
Website

Cleaning up clogged root (system) partition

Disclaimer: I am no expert in Linux system management but I trust real experts will correct errors below.

Background:

Some time ago I suddenly had problems watching Flash video content and it turned out my root partition was very, very close to 100% full. See http://crunchbanglinux.org/forums/topic … this-week/ I was lucky only watching Flash videos didn't work. It could have been much, much worse.

Manual cleaning up:

The reason the root partition was full was a very large number of .deb files in /var/cache/apt/archives and big log files in /var/log.

sudo apt-get autoclean

deletes .deb files that are obsolete ("...can no longer be downloaded, and are largely useless." in the words of man apt-get.) This got my system back into normal behaviour but the root partition was still dangerously full.

sudo apt-get clean

deletes all .deb files from the cache. This made quite a difference in root partition space for me.

Let's move over to the log files in /var/log. If you, like me, never study these and don't know how to interpret their content you can delete all enumerated versions: dmesg.0, dmesg.1.gz etc. This also made quite a difference to my system. I now have close to 20% free space on my root partition.

Possible long-term options:

Putting /var on its own HD partition would stop run-away log files from freezing your system, I am told.

There is a program called logrotate that can be used for managing log files. Read on at man logrotate for more information. The puzzle to me here is it looks like syslog and kern.log are managed by logrotate but there is nothing on them in the config files for logrotate.

In the preferences of Synaptic one can choose the option "Delete downloaded packages after installation". If it does what it says -- I have not tested yet -- it should remove all .deb files after installation.

/Martin

Offline

Help fund CrunchBang, donate to the project!

#2 2010-06-05 11:42:32

bozhkov
#! Junkie
Registered: 2009-12-29
Posts: 463

Re: Cleaning up clogged root (system) partition

I could also use deborphan and localepurge. Deborphan is used to remove orphaned(unneeded) packages from the system.

apt-get install deborphan
deborphan

or optionally:

deborphan --guess-data

and to remove the listed packages:

apt-get purge $(deborphan)

Localepurge is even easier -
when you install it via:

apt-get install localepurge

you will have to select the locales you want to keep.

PS: Please read the man pages before using this.

man deborphan
man localepurge

Cheers,
bozhkov

Offline

#3 2010-06-14 03:04:20

winotree
#! Die Hard
Registered: 2010-03-26
Posts: 548

Re: Cleaning up clogged root (system) partition

MartinRF wrote:

....In the preferences of Synaptic one can choose the option "Delete downloaded packages after installation". If it does what it says -- I have not tested yet -- it should remove all .deb files after installation.

This was one of, if not the first change I made to my system, a change that has become habit: it does exactly as it says.  wink

Offline

Board footer

Powered by FluxBB

Copyright © 2012 CrunchBang Linux.
Proudly powered by Debian. Hosted by Linode.
Debian is a registered trademark of Software in the Public Interest, Inc.

Debian Logo