How to Completely Disable ‘Zsys’ (ZFS Snapshot Daemon) in Ubuntu to Save Disk Space

In recent years, Ubuntu introduced experimental support for installing the operating system on a ZFS root file system. One of the primary benefits of this setup is the inclusion of a background daemon called zsys. This service automatically takes a ZFS snapshot of your entire operating system every single time you use apt to install or upgrade a package. This allows you to instantly roll back your entire system from the GRUB bootloader if an update breaks your machine.

While this snapshotting capability is incredible for system stability, it can become a massive liability for disk space. ZFS snapshots consume space based on the difference between the snapshot and the current file system. If you frequently update large packages, compile code, or manage databases on a server with a relatively small hard drive, these automated zsys snapshots will quickly silently consume 100% of your disk space. If you prefer to manage your ZFS snapshots manually, you must completely disable the automated zsys daemon.

Disabling the Automated Zsys Daemon via Systemctl

To stop the automated snapshots, you must kill the background service that triggers them.

  1. Open a Terminal window (or connect via SSH).
  2. First, stop the daemon from running in your current session:
    sudo systemctl stop zsysd.service
  3. Next, disable the service so it does not start on the next reboot:
    sudo systemctl disable zsysd.service
  4. Finally, mask the service to ensure no other ZFS tools accidentally wake it up:
    sudo systemctl mask zsysd.service

Removing the APT Hook (Critical Step)

Stopping the daemon is not enough. The zsys package also installs a specific hook into the apt package manager that forces it to communicate with the daemon before any installation. If you disable the daemon but leave the hook, your apt install commands will freeze or fail entirely.

  1. Navigate to the APT configuration directory:
    cd /etc/apt/apt.conf.d/
  2. Look for a file named 90_zsys_system_autosnapshot (the exact number prefix might vary slightly).
  3. You must delete or rename this file to prevent APT from triggering the snapshot script. To safely rename it and disable it, run:
    sudo mv 90_zsys_system_autosnapshot 90_zsys_system_autosnapshot.disabled

Purging Existing Automated Snapshots

Now that the system will no longer create new snapshots automatically, you need to manually delete the old ones to reclaim your disk space.

  1. List all your current ZFS snapshots by running:
    zfs list -t snapshot
  2. Identify the automated snapshots (they are usually prefixed with autozsys_).
  3. Delete them manually using the zfs destroy command. For example:
    sudo zfs destroy rpool/ROOT/ubuntu_dataset@autozsys_example_string

Your Ubuntu system will now operate on ZFS as a high-performance file system, but it will only take snapshots when you explicitly command it to using the standard zfs snapshot command.

Get the best tech tips delivered straight to your inbox.

Join thousands of readers mastering Apple, Google, Microsoft, and Linux.