LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
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 02-09-2016, 08:04 PM   #1
rbees
Member
 
Registered: Mar 2004
Location: northern michigan usa
Distribution: Debian Squeeze, Whezzy, Jessie
Posts: 921

Rep: Reputation: 46
/var/tmp hogging space


Ladies & Gents

Thanks for all the help and guidance given on this site.

I discovered that /var/tmp is just loaded with data hogging space on my / disk partition. Since my partitions are encrypted resizing them is a pain. There were a lot of log files from Opera that I removed, somehow two and three year old crash logs are useless.

There are also a bunch of one and two year old files like
Code:
/var/tmp/mkinitramfs_uOipnE/:
total 40
drwxr-xr-x 6 root root 4096 Nov  8  2014 etc
drwxr-xr-x 2 root root 4096 Nov  8  2014 sbin
drwxr-xr-x 2 root root 4096 Nov  8  2014 bin
drwxr-xr-x 9 root root 4096 Nov  8  2014 lib
drwxr-xr-x 2 root root 4096 Nov  8  2014 lib64
drwxr-xr-x 3 root root 4096 Nov  8  2014 conf
drwxr-xr-x 8 root root 4096 Nov  8  2014 scripts
-rwxr-xr-x 1 root root 7018 Nov  8  2014 init
drwxr-xr-x 2 root root 4096 Nov  8  2014 run

/var/tmp/mkinitramfs_riyL5f/:
total 40
drwxr-xr-x 6 root root 4096 Nov  8  2014 etc
drwxr-xr-x 2 root root 4096 Nov  8  2014 sbin
drwxr-xr-x 2 root root 4096 Nov  8  2014 bin
drwxr-xr-x 9 root root 4096 Nov  8  2014 lib
drwxr-xr-x 2 root root 4096 Nov  8  2014 lib64
drwxr-xr-x 3 root root 4096 Nov  8  2014 conf
drwxr-xr-x 8 root root 4096 Nov  8  2014 scripts
-rwxr-xr-x 1 root root 7018 Nov  8  2014 init
drwxr-xr-x 2 root root 4096 Nov  8  2014 run
There are also a bunch of zero byte files from as much as two years ago like
Code:
| mkinitramfs-FW_ANOax7   │      0│Sep 17 13:28│
│ mkinitramfs-FW_ECQBtb   │      0│Sep 17 16:04│ 
│ mkinitramfs-FW_GLz7Uu   │      0│Sep 17 13:32│
│ mkinitramfs-FW_Geem7x   │      0│Sep 17 14:10│
│ mkinitramfs-FW_JwIrhB   │      0│Aug 21 17:08│
│ mkinitramfs-FW_OXVgFv   │      0│Jul 19  2015│
│ mkinitramfs-FW_PY6CtQ   │      0│Jul 19  2015
These can't all need to be kept can they? I gather that a lot of them are from update fails because of a lack of drive space to complete the install, which only compounds the problem, or because a package, like virtualbox, fails to complete its install for some reason. At a 170meg apiece for the directories, twenty one of them, it doesn't take long to chew up a bunch of space.

How much of it is safe to remove?

Thanks
 
Old 02-09-2016, 08:27 PM   #2
rknichols
Senior Member
 
Registered: Aug 2009
Distribution: Rocky Linux
Posts: 4,774

Rep: Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211
You can certainly get rid of all the mkinitramfs* directories. They are only used when installing a new kernel and really should be deleted automatically once that is done successfully.

To keep things clean in the future, install the tmpreaper package, "Cleans up files in directories based on their age."
 
Old 02-09-2016, 08:40 PM   #3
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 19,307
Blog Entries: 28

Rep: Reputation: 6136Reputation: 6136Reputation: 6136Reputation: 6136Reputation: 6136Reputation: 6136Reputation: 6136Reputation: 6136Reputation: 6136Reputation: 6136Reputation: 6136
Do you have logrotate installed and working? http://www.debianhelp.co.uk/logwatch.htm
 
Old 02-09-2016, 09:13 PM   #4
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,119

Rep: Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120
The OP is querying /var/tmp, not /var/log.

/var/tmp is non-permanent (rather than ephemeral like /tmp). If it's been there for what you consider too long, just delete it. And certainly the initramfs stuff can go anytime IMHO.
 
Old 02-10-2016, 04:43 AM   #5
rbees
Member
 
Registered: Mar 2004
Location: northern michigan usa
Distribution: Debian Squeeze, Whezzy, Jessie
Posts: 921

Original Poster
Rep: Reputation: 46
Thanks,

What about this type of directory? There are also a bunch of them although not as old.

Code:
/systemd-private-f88d44~-daemon.service-iDw68M
The more I think about it I think some of them are a result of KDE failing to launch the gui, which results in me having to ctrl+alt+f? to a different console and reboot leaving stuff behind.

I will check that logrotate is working correctly and look into tmpreaper when I get a chance.

Thanks again

Thanks again
 
  


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
Bad exit status from /var/tmp/rpm-tmp.Cs9Mt5 (%build) imbrij Linux - Virtualization and Cloud 11 10-27-2012 10:55 AM
"No space left on device" error on /tmp. How to increase space on /tmp? anilp Linux - Newbie 12 01-24-2011 01:40 PM
increasing partitions space of root,var,tmp arshzia Linux - Software 1 05-28-2008 06:15 AM
how to securing /tmp , /var/tmp and /dev/shm hackintosh Linux - Security 7 10-17-2007 11:26 PM
Newbie question - /tmp /var/tmp Mr happy Linux - Security 3 01-27-2003 01:03 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 01:05 AM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration