Hi,

I got warning message that "/var is almost full." Knowing that being
full on a hard drive is never good, I want to resolve this.

>From command line: /var# du -h --max-depth=1
1.8G    ./lib
4.0K    ./local
2.7M    ./tmp
16K     ./lost+found
44K     ./snap
6.3G    ./cache
4.0K    ./opt
56K     ./spool
4.0K    ./mail
8.2M    ./backups
139M    ./log
8.2G    .

So, my backups seems to be causing the main issue, followed closely by
the cache.

Here is what my backups look like: ls -l
-rw-r--r-- 1 root root    153600 Apr 30 06:59 alternatives.tar.0
-rw-r--r-- 1 root root      9980 Apr 27 00:08 alternatives.tar.1.gz
-rw-r--r-- 1 root root      9978 Apr 20 00:08 alternatives.tar.2.gz
-rw-r--r-- 1 root root      9980 Mar 29 03:53 alternatives.tar.3.gz
-rw-r--r-- 1 root root      9985 Mar 27 00:08 alternatives.tar.4.gz
-rw-r--r-- 1 root root      9973 Mar 24 00:08 alternatives.tar.5.gz
-rw-r--r-- 1 root root      9908 Mar 15 11:50 alternatives.tar.6.gz
-rw-r--r-- 1 root root    175620 Apr 29 01:11 apt.extended_states.0
-rw-r--r-- 1 root root     18347 Apr 28 22:35 apt.extended_states.1.gz
-rw-r--r-- 1 root root     18312 Apr 27 23:56 apt.extended_states.2.gz
-rw-r--r-- 1 root root     18256 Feb 19 08:42 apt.extended_states.3.gz
-rw-r--r-- 1 root root     18243 Jan 20 15:23 apt.extended_states.4.gz
-rw-r--r-- 1 root root     18366 Jan 13 22:48 apt.extended_states.5.gz
-rw-r--r-- 1 root root     18351 Jan 12 07:40 apt.extended_states.6.gz
-rw-r--r-- 1 root root       678 Sep  6  2018 dpkg.diversions.0
-rw-r--r-- 1 root root       271 Sep  6  2018 dpkg.diversions.1.gz
-rw-r--r-- 1 root root       271 Sep  6  2018 dpkg.diversions.2.gz
-rw-r--r-- 1 root root       271 Sep  6  2018 dpkg.diversions.3.gz
-rw-r--r-- 1 root root       271 Sep  6  2018 dpkg.diversions.4.gz
-rw-r--r-- 1 root root       271 Sep  6  2018 dpkg.diversions.5.gz
-rw-r--r-- 1 root root       271 Sep  6  2018 dpkg.diversions.6.gz
-rw-r--r-- 1 root root       239 Nov 12 02:44 dpkg.statoverride.0
-rw-r--r-- 1 root root       184 Nov 12 02:44 dpkg.statoverride.1.gz
-rw-r--r-- 1 root root       184 Nov 12 02:44 dpkg.statoverride.2.gz
-rw-r--r-- 1 root root       184 Nov 12 02:44 dpkg.statoverride.3.gz
-rw-r--r-- 1 root root       184 Nov 12 02:44 dpkg.statoverride.4.gz
-rw-r--r-- 1 root root       184 Nov 12 02:44 dpkg.statoverride.5.gz
-rw-r--r-- 1 root root       184 Nov 12 02:44 dpkg.statoverride.6.gz
-rw-r--r-- 1 root root   3002519 Apr 30 06:55 dpkg.status.0
-rw-r--r-- 1 root root    829132 Apr 28 22:36 dpkg.status.1.gz
-rw-r--r-- 1 root root    824705 Apr 27 23:56 dpkg.status.2.gz
-rw-r--r-- 1 root root    820759 Apr 26 23:23 dpkg.status.3.gz
-rw-r--r-- 1 root root    820758 Apr 19 23:06 dpkg.status.4.gz
-rw-r--r-- 1 root root    820758 Apr 19 23:06 dpkg.status.5.gz
-rw-r--r-- 1 root root    820758 Apr 19 23:06 dpkg.status.6.gz
-rw------- 1 root root       991 Apr 28 22:35 group.bak
-rw------- 1 root shadow     833 Apr 28 22:35 gshadow.bak
-rw------- 1 root root      2280 Apr 28 22:35 passwd.bak
-rw------- 1 root shadow    1445 Apr 28 22:35 shadow.bak


Here is my cache: du -h --max-depth=1
6.7M    ./locate
159M    ./postgresql
8.0K    ./PackageKit
8.0K    ./anthy
4.0K    ./fonts
4.0K    ./apparmor
6.5M    ./debconf
30M     ./cracklib
6.1G    ./apt
328K    ./cups
132K    ./dictionaries-common
1.3M    ./snapd
4.0K    ./realmd
1.7M    ./app-info
4.1M    ./man
88K     ./ldconfig
4.0K    ./gdm
11M     ./fontconfig
6.3G    .

So, from this, I can gather that my /var/cache/apt and
/var/backups/(mostly dpkg.status.#.gz) are hogging all my space.

I cleaned the cache with: sudo apt-get clean
 
and, now my cache is pretty good now.

I am still curious, what purpose (what is safe to remove) the
/var/backups play. Unfortunately, the keyword "backups" brings up a lot
of unrelated topics.

Any tips would be appreciated.


Reply via email to