6

How can I disable the automatic ZFS snapshots on Ubuntu 20.04 with ZFS on root?

zsys seems to create snapshots but doesn't seem to remove them, which causes my system to run out of disk space.

2 Answers 2

11

ZSys automatically removes snapshots after a while and you can configure how many snapshots should be saved. The automatic removal system only looks at the number of snapshots, however. It does not take into account how much space you have left and how much space a snapshot uses.

Disable user snapshots

ZSys automatically creates a snapshot of user data (your home directory) each hour. To disable these snapshots, run the following commands:

systemctl --user stop zsys-user-savestate.timer
systemctl --user disable zsys-user-savestate.timer

Disable system snapshots

ZSys also automatically creates a snapshot of the system (packages, snaps, etc.) every time you install a package. To disable these snapshots, run the following command:

sudo mv /etc/apt/apt.conf.d/90_zsys_system_autosnapshot /etc/apt/apt.conf.d/90_zsys_system_autosnapshot.disabled

Re-enable snapshots

Follow these instructions if you want to turn the snapshots back on.

To re-enable user snapshots, run the following command.

systemctl --user start zsys-user-savestate.timer
systemctl --user enable zsys-user-savestate.timer

To re-enable system snapshots, run the following command.

sudo mv /etc/apt/apt.conf.d/90_zsys_system_autosnapshot.disabled /etc/apt/apt.conf.d/90_zsys_system_autosnapshot
0

You can uninstall zsys, but perhaps you should file a bug about it?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.