11

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

16

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?

1
  • unfortunately bugs have been filed about this, and many other zsys issues, but Ubuntu upstream seems very unconcerned with actually improving this very limited snapshoting system. until they change their minds and start addressing the obvious design problems with this app, it's probably better to just uninstall in the majority of cases. it's not designed for desktop use, but doesn't seem to understand common server use cases either, so it's overall a net loss, and other tools do generally do a better job. or at least are better documented and their behaviour better understood.
    – Tessa N
    Commented Oct 4, 2022 at 23:44

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .