zfs-auto-snapshot command not found

In this troubleshooting guide we learn how to fix zfs-auto-snapshot command not found error message

Introduction

When you run more command in linux terminal / console, you get the following error message

zfs-auto-snapshot: command not found

or when using sudo you get the following error message

sudo: zfs-auto-snapshot: command not found

Solutions to zfs-auto-snapshot: command not found

How To Fix zfs-auto-snapshot: command not found in Ubuntu / Debian / Kali Linux / Raspbian

In Ubuntu zfs-auto-snapshot is provided by zfs-auto-snapshot package.

zfs-auto-snapshot is:

Automatically create, rotate, and destroy periodic ZFS snapshots. This is the utility that creates the @zfs-auto-snap_frequent, @zfs-auto-snap_hourly, @zfs-auto-snap_daily, @zfs-auto-snap_weekly, and @zfs-auto-snap_monthly snapshots if it is installed.

This program is a posixly correct bourne shell script. It depends only on the zfs utilities and cron, and can run in the dash shell.

To fix this problem, we can install more using the command below.

sudo apt-get -y install zfs-auto-snapshot

This command might take some time to finish depending on your machine internet connection.

You can also use apt command to install zfs-auto-snapshot.

sudo apt -y install zfs-auto-snapshot

Or if you have aptitude installed you can use the following command.

sudo aptitude install zfs-auto-snapshot

Summary

In this tutorial we learn how to fix zfs-auto-snapshot command not found error in Ubuntu / Debian / Kali Linux or Raspbian distribution.