/var getting full

Whether you are using Linux on the desktop or as a server, it's still good that you're using Linux. Linux related questions go here.

Moderator: General Moderators

Post Reply
User avatar
s.dot
Tranquility In Moderation
Posts: 5001
Joined: Sun Feb 06, 2005 7:18 pm
Location: Indiana

/var getting full

Post by s.dot »

How can I view the biggest files on /var ?

Also, I'm pretty sure what's taking up all the space is /var/log and the mailqueue

Is it as easy as

Code: Select all

rm -r /var/log
to remove the log files? I don't need to worry about backup as these are mostly reallllyyy old log files, cuz all i've been doing on this server is testing for a long while.

I want to ask before I go and do something stupid :)
Set Search Time - A google chrome extension. When you search only results from the past year (or set time period) are displayed. Helps tremendously when using new technologies to avoid outdated results.
User avatar
VladSun
DevNet Master
Posts: 4313
Joined: Wed Jun 27, 2007 9:44 am
Location: Sofia, Bulgaria

Post by VladSun »

Code: Select all

du -a /var | sort -g
There are 10 types of people in this world, those who understand binary and those who don't
User avatar
s.dot
Tranquility In Moderation
Posts: 5001
Joined: Sun Feb 06, 2005 7:18 pm
Location: Indiana

Post by s.dot »

I deleted the log files. Here's the files that take up the most space.

Code: Select all

10256   /var/db/backup/ibdata1
12048   /var/db/backup/smp_/privatemessages_data.MYD
15168   /var/db/backup/smp_/zipdata.MYI
15920   /var/db/sup/ports-all/checkouts.cvs:.
15922   /var/db/sup/ports-all
16682   /var/cpanel/bandwidth
16726   /var/db/sup
17888   /var/db/backup/smp_/privatemessages_data.MYI
17984   /var/db/backup/smp_/users.MYD
18516   /var/db/pkg
19472   /var/db/backup/smp_/forumentries.MYI
20032   /var/tmp/phpfgC5MB
23120   /var/tmp/phprovLoh
26970   /var/cpanel
32832   /var/tmp/vi.recover/vi.Q15Mo4
33576   /var/tmp/vi.recover
38608   /var/db/backup/smp_/zipdata.MYD
41152   /var/db/backup/smp_/messages.MYD
45840   /var/db/backup/fc_fc/adds.MYD
47072   /var/tmp/phpufnLtX
72208   /var/db/backup/smp_/privatemessages.MYD
96656   /var/db/backup/fc_fc/adds.MYI
149430  /var/db/backup/fc_fc
169632  /var/db/backup/smp_/forumentries.MYD
451258  /var/db/backup/smp_
584254  /var/tmp
622050  /var/db/backup
1974918 /var/spool/cpbsdpkgs
1981772 /var/spool
4436112 /var/db/mysql/ibdata1
4449788 /var/db/mysql
5108506 /var/db
7701763 /var
I figure it's safe to delete /var/db/backup, as it's just old copies of /var/db?
Set Search Time - A google chrome extension. When you search only results from the past year (or set time period) are displayed. Helps tremendously when using new technologies to avoid outdated results.
Post Reply