Timeshift is an application that comes automatically installed and configured on Linux Mint. It is used for taking incremental snapshots of the file system and settings. Today I will be talking about how Timeshift rapidly filled up my file system where I was left with so little space that I couldn’t even login! I will also be talking about what troubleshooting steps I took to alleviate the problem.

One afternoon I had noticed that the file system on my computer had a very small amount of free space available. This was odd to me because there was no obvious reason as to why it would be completely full. So I started looking for ways to free up some space - I removed unrequired packages, removed outdated packages and removed all systemd logs up until 3 days ago.

sudo apt-get autoremove
sudo apt-get autoclean
sudo journalctl --vacuum-time=3d

I thought that this would help, but it did not.

Later that same day, I went to login into my computer and found that I couldn’t. I realized that I was in a “login loop”, where I could enter my username and password but would just be redirected back to the login screen. This occurred because the percentage of disk space I had left on my root partition was less than 5%, which is the default that is reserved for the system.

What I had to do to get around the “login loop” was to first press [Ctrl]+[Alt]+[F1] to switch to the command line prompt. From there I changed the default root-reserved percentage to 0 with:

sudo tune2fs -m0 /dev/sda1

I rebooted and was able to login! From there I changed the default back to 5%:

sudo tune2fs -m5 /dev/sda1

Then, I used the Disk Usage Analyzer to see what was taking up all that space. I could see at that time that timeshift was the culprit, so I deleted all snapshots and lo and behold, the disk space was recovered!

But now the question was, why did this happen? And how could I make sure that this doesn’t happen again? Well, at the time there was a known issue, and it seemed like timeshift had started creating its backups to /var for some reason and because it was also supposed to backup /var it just continuously backed up itself until it became completely full.

But the main thing is that I am aware of it and now know that I should not save the snapshots in the root partition but rather in a separate partition. I also changed the default to not have snapshots taken every day, but instead once monthly.

I hope this may help someone identify and fix the problem quickly! Thanks for reading 😄