You are not logged in.
Hi,
I'm running a fully updated Arch_64/KDE with a separate 6.2 GB /var partition.
Recently, I've noticed my /vat almost full, and it's not the pacman cache!
Searching (look below) I've found /var/tmp to be filled with many directories, all of them with names beginning with "systemd-private".
1. is this OK?
2. Can I (as root) safely delete all those folders (inc. contents) to regain my /var space?
Thanks
-----------copy of terminal output--------------
# pwd
/var
[root@Miki_Arch var]# ls -l
total 1832
drwxr-xr-x 7 root root 4096 Jul 20 2012 cache
drwxr-xr-x 3 root root 4096 Jan 28 11:41 db
drwxr-xr-x 2 root root 4096 Jun 20 2012 empty
drwxrwxr-x 2 root games 4096 Mar 14 21:20 games
drwxr-xr-x 24 root root 4096 Mar 16 08:53 lib
drwxr-xr-x 2 root root 4096 Mar 14 21:20 local
lrwxrwxrwx 1 root root 11 Mar 14 21:20 lock -> ../run/lock
drwxr-xr-x 7 root root 4096 Mar 17 09:32 log
drwx------ 2 root root 16384 Jul 20 2012 lost+found
lrwxrwxrwx 1 root root 10 Mar 14 21:20 mail -> spool/mail
drwxr-xr-x 2 root root 4096 Mar 14 21:20 opt
lrwxrwxrwx 1 root root 6 Mar 14 21:20 run -> ../run
drwxr-xr-x 6 root root 4096 Mar 16 08:53 spool
drwxrwxrwt 39193 root root 1818624 Mar 17 09:41 tmpBest regards,
Michael Badt
Offline
1. is this OK?
yes, they are part of systemds' PrivateTmp feature.
2. Can I (as root) safely delete all those folders (inc. contents) to regain my /var space?
no, these are not supposed to be deleted. Are you sure these directories actually waste space? On my systems all of them are empty.
Offline
Offline
Thanks all!
One more question:
df -h reports that of the 6.8 available for /var, 6.2 GB is used (see below).
Yet the largest (/var) sub-directory is the tmp which uses only 1.8GB which is WAY SMALLER than the 6.2GB reported above.
Can somebody explain me what's "eating" my /var space?
Thanks!
--------------copy of terminal-----------
[root@Miki_Arch /]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda2 12G 5.8G 5.2G 53% /
dev 3.9G 0 3.9G 0% /dev
run 3.9G 6.7M 3.9G 1% /run
tmpfs 3.9G 904K 3.9G 1% /dev/shm
tmpfs 3.9G 0 3.9G 0% /sys/fs/cgroup
/dev/sda3 1.1T 1002G 26G 98% /home
tmpfs 3.9G 64K 3.9G 1% /tmp
/dev/sdb1 74G 59G 15G 81% /windows
/dev/sda1 46M 30M 14M 70% /boot
/dev/sdb6 6.8G 6.2G 204M 97% /var
/dev/sda7 64G 47G 17G 74% /images_sda
/dev/sdb2 49G 38G 11G 78% /lin_back
/dev/sdb3 1.3T 789G 471G 63% /photos
[root@Miki_Arch /]# cd /var
[root@Miki_Arch var]# ls -al
total 1840
drwxr-xr-x 13 root root 4096 Mar 16 08:53 .
drwxr-xr-x 27 root root 4096 Mar 16 08:53 ..
drwxr-xr-x 7 root root 4096 Jul 20 2012 cache
drwxr-xr-x 3 root root 4096 Jan 28 11:41 db
drwxr-xr-x 2 root root 4096 Jun 20 2012 empty
drwxrwxr-x 2 root games 4096 Mar 14 21:20 games
drwxr-xr-x 24 root root 4096 Mar 16 08:53 lib
drwxr-xr-x 2 root root 4096 Mar 14 21:20 local
lrwxrwxrwx 1 root root 11 Mar 14 21:20 lock -> ../run/lock
drwxr-xr-x 7 root root 4096 Mar 17 10:23 log
drwx------ 2 root root 16384 Jul 20 2012 lost+found
lrwxrwxrwx 1 root root 10 Mar 14 21:20 mail -> spool/mail
drwxr-xr-x 2 root root 4096 Mar 14 21:20 opt
lrwxrwxrwx 1 root root 6 Mar 14 21:20 run -> ../run
drwxr-xr-x 6 root root 4096 Mar 16 08:53 spool
drwxrwxrwt 39193 root root 1818624 Mar 17 14:18 tmpBest regards,
Michael Badt
Offline
Thanks all!
One more question:
df -h reports that of the 6.8 available for /var, 6.2 GB is used (see below).
Yet the largest (/var) sub-directory is the tmp which uses only 1.8GB which is WAY SMALLER than the 6.2GB reported above.
Can somebody explain me what's "eating" my /var space?Thanks!
--------------copy of terminal-----------
[root@Miki_Arch /]# df -h Filesystem Size Used Avail Use% Mounted on /dev/sda2 12G 5.8G 5.2G 53% / dev 3.9G 0 3.9G 0% /dev run 3.9G 6.7M 3.9G 1% /run tmpfs 3.9G 904K 3.9G 1% /dev/shm tmpfs 3.9G 0 3.9G 0% /sys/fs/cgroup /dev/sda3 1.1T 1002G 26G 98% /home tmpfs 3.9G 64K 3.9G 1% /tmp /dev/sdb1 74G 59G 15G 81% /windows /dev/sda1 46M 30M 14M 70% /boot /dev/sdb6 6.8G 6.2G 204M 97% /var /dev/sda7 64G 47G 17G 74% /images_sda /dev/sdb2 49G 38G 11G 78% /lin_back /dev/sdb3 1.3T 789G 471G 63% /photos [root@Miki_Arch /]# cd /var [root@Miki_Arch var]# ls -al total 1840 drwxr-xr-x 13 root root 4096 Mar 16 08:53 . drwxr-xr-x 27 root root 4096 Mar 16 08:53 .. drwxr-xr-x 7 root root 4096 Jul 20 2012 cache drwxr-xr-x 3 root root 4096 Jan 28 11:41 db drwxr-xr-x 2 root root 4096 Jun 20 2012 empty drwxrwxr-x 2 root games 4096 Mar 14 21:20 games drwxr-xr-x 24 root root 4096 Mar 16 08:53 lib drwxr-xr-x 2 root root 4096 Mar 14 21:20 local lrwxrwxrwx 1 root root 11 Mar 14 21:20 lock -> ../run/lock drwxr-xr-x 7 root root 4096 Mar 17 10:23 log drwx------ 2 root root 16384 Jul 20 2012 lost+found lrwxrwxrwx 1 root root 10 Mar 14 21:20 mail -> spool/mail drwxr-xr-x 2 root root 4096 Mar 14 21:20 opt lrwxrwxrwx 1 root root 6 Mar 14 21:20 run -> ../run drwxr-xr-x 6 root root 4096 Mar 16 08:53 spool drwxrwxrwt 39193 root root 1818624 Mar 17 14:18 tmp
the number you see is in bytes, meaning that /var/tmp is actually 1,8MB, not GB. This number does not represent the size of the actual directory including its content. It's only the number of bytes the directory itself uses on the filesystem (or something like that, I'm not sure how exactly this value is calculated, I think this depends on the filesystem as well).
If you want to know what actually uses all that space, you better use something like "du":
# du -sh /var/*
44M /var/abs
393M /var/cache
44K /var/db
0 /var/empty
0 /var/games
22M /var/lib
0 /var/local
4,0K /var/lock
291M /var/log
4,0K /var/mail
0 /var/opt
4,0K /var/run
0 /var/spool
0 /var/tmpOffline
My guess is that the pacman cache in /var/cache/pacman/pkg has been growing in size since you installed arch.
Try this:
https://aur.archlinux.org/packages/cacheclean
Last edited by teateawhy (2013-03-17 18:59:32)
Offline
Install "ncdu" from [community]. It will show how much space each directory is taking and let you navigate to the files that are responsible for most of it.
As for the systemd empty folder spam in /var/tmp, you can create the following file to get rid of them:
/etc/tmpfiles.d/remove-empty-dirs_var-timp.conf
r /var/tmp/* - - - 1d -I've had that on my system for months without any issue and it keeps my /var/tmp nice and clean.
My Arch Linux Stuff • Forum Etiquette • Community Ethos - Arch is not for everyone
Offline
My guess is that the pacman cache in /var/cache/pacman/pkg has been growing in size since you installed arch.
Try this:
https://aur.archlinux.org/packages/cacheclean
There is actually a nice script in pacman-contrib that has this functionality. No need for cacheclean anymore. I mean, of course you're welcome to continue using that, but I used to use it, and I find that paccache is far superior in its functionality. Its up to you though.
Offline
Yes, paccache is better.
Offline
+1 for paccache which I just discovered here in this thread ![]()
Offline