Btrfs snapshot auto delete solution?

I’ve been using Linux for years now and in fact have gotten family members to prefer it as well. However, every Linux system I have set up has one issue: Timeshift does not autoclear snapshots and Pacman does not know how to check available disk space on a Btrfs system. So about every few months I will update my system and run out of disk space during the upgrade… Is there any way to

  1. Have the oldest snapshot in timeshift delete when disk space is low and
  2. Have Pacman refuse to upgrade/install if disk space is too low on a btrfs system/


I think the Btrfs setup takes care of the number of snapshots you want to keep and deletes older snapshots if I’m not mistaken. I did have that setup before as per the wiki but have since moved over to Btrfs and Snapper which can also be configured that way.

1 Like

You are not mistaken. I use Timeshift with BTRFS and my setup limits the snapshots to the last 3 days and the last 3 boots. Others and olders are deleted. (of course you can choose different schedule and setup).

BTRFS itself does not manage snapshots per se; that’s what timeshift and/or snapper are for. Neither of these tools are installed by default.