A few days ago my Raspberry Pi “died”, which was pretty annoying because I just wanted to watch a movie which is on the NFS drive (served by this Raspberry Pi)… Tried to boot it up again, no success, just hangs at some random boot state. So investigated the SD-card. Turned out that a file /var/backups/alternatives.tar.0 filled up all the disk space! WTF!? Usually root has a few percentage reserved disk space (by default 5%) to prevent the system to “die” if it runs out of space. But as the process creating this altneratives.tar.0 file was run by root, it just carried on writing to the disk until everything died, great.


# Mount second partition of the SD card 
# on another machine, e.g. /tmp/mnt

# Delete everything under /var/backups
rm -rf /tmp/mnt/var/backups/*

To prevent this from happening again:

# Delete dpkg cron job (which I suspect creates these files)
rm /tmp/mnt/etc/cron.daily/dpkg