1 minutes reading and was tagged with:
Snapper clean up
A while ago I did a btrfs migration that includes the usage of snapper.
However, once in a while my disk is running full. Simply for every install sets of packages in pacman, snapper creates a snapshot.
So I need to clean up the snapshots of Snapper to get free disk space. Lucky enough, Snapper provide a unit file:
[Unit] Description=Daily Cleanup of Snapper Snapshots Documentation=man:snapper(8) man:snapper-configs(5) [Timer] OnBootSec=10m OnUnitActiveSec=1d [Install] WantedBy=timers.target
Running this will make Snapper clean up old snapshots and free disk space! For persistence you can enable this unit file:
sudo systemctl enable snapper-cleanup.timer
However doing this everyday seems to me a little bit much. So I changed to it once a week instead.
So my unit file looks like this:
[Unit] Description=Daily Cleanup of Snapper Snapshots Documentation=man:snapper(8) man:snapper-configs(5) [Timer] OnBootSec=10m OnUnitActiveSec=1w [Install] WantedBy=timers.target
After doing this you need to run
sudo systemctl daemon-reload to enable the changes.
best regards Akendo