My server running Ubuntu 14.04.5 server
had its hard disk filled very quickly.
Directory /var/cache/apt
was full of files like this:
-rw-r--r-- 1 root root 41M Mar 11 05:16 pkgcache.bin.t7Hu64
-rw-r--r-- 1 root root 42M Mar 11 05:16 pkgcache.bin.786Hkg
-rw-r--r-- 1 root root 42M Mar 11 05:17 pkgcache.bin.HYjl6J
-rw-r--r-- 1 root root 42M Mar 11 05:17 pkgcache.bin.h6Hk8l
Few files got created every minute. After some research I found that Unattended upgades was causing this. Probably because there had been some problem with Apt-mirror.
Using apt-get update
got erros:
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/trusty-updates/main/source/Sources Hash Sum mismatch
W: Failed to fetch http://local.apt.mirror/ubuntu/dists/trusty-updates/universe/binary-amd64/Packages Hash Sum mismatch
W: Failed to fetch http://local.apt.mirror/ubuntu/dists/trusty-updates/universe/binary-i386/Packages Hash Sum mismatch
E: Some index files failed to download. They have been ignored, or old ones used instead.
I was able to fix this by doing apt-get clean
on the server.
Is there way to change behaviour of Unattended upgades so that I would not fill disk with temp files when there are some problems with apt-get update
?
It would be much better to have Unattended upgades stop at error instead of keeping going until disk is filled with temp files.
EDIT: I am not asking about Hash sum mismatch
. I know what it is and how it can be solved. I am asking about Unattended upgrades
.
Hash sum mistach
probably caused the problem I have, but I is not what I am asking about here. – Madoc Comadrin Mar 13 '17 at 11:34