On Ubuntu Xenial server, installing zfsnap exists with error status 0. However, the package isn't properly installed:

$ zfsnap
zfsnap: command not found
$ sudo dpkg -p zfsnap
dpkg-query: package 'zfsnap' is not available
Use dpkg --info (= dpkg-deb --info) to examine archive files,
and dpkg --contents (= dpkg-deb --contents) to list their contents.
$ sudo dpkg -s zfsnap
Package: zfsnap
Status: install ok installed
Priority: extra
Section: admin
Installed-Size: 80
Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
Architecture: all
Version: 1.11.1-3
Depends: zfs-fuse | zfsutils | zfs, bc

Is there anything here (or something else I should look at) that suggests why the package isn't working properly?

Below is apt's output for the installation:

$ sudo apt install zfsnap
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following additional packages will be installed:
The following NEW packages will be installed:
  bc zfsnap
0 upgraded, 2 newly installed, 0 to remove and 20 not upgraded.
Need to get 97.9 kB of archives.
After this operation, 328 kB of additional disk space will be used.
Do you want to continue? [Y/n] 
Get:1 http://il.archive.ubuntu.com/ubuntu xenial/main amd64 bc amd64 1.06.95-9build1 [82.6 kB]
Get:2 http://il.archive.ubuntu.com/ubuntu xenial/universe amd64 zfsnap all 1.11.1-3 [15.4 kB]
Fetched 97.9 kB in 1s (69.7 kB/s)
Selecting previously unselected package bc.
(Reading database ... 175968 files and directories currently installed.)
Preparing to unpack .../bc_1.06.95-9build1_amd64.deb ...
Unpacking bc (1.06.95-9build1) ...
Selecting previously unselected package zfsnap.
Preparing to unpack .../zfsnap_1.11.1-3_all.deb ...
Unpacking zfsnap (1.11.1-3) ...
Processing triggers for man-db (2.7.5-1) ...
Processing triggers for install-info (6.1.0.dfsg.1-5) ...
Setting up bc (1.06.95-9build1) ...
Setting up zfsnap (1.11.1-3) ...
$ echo $?

You can view a list of files included in a package with

dpkg-query -L zfsnap

To see the usable commands you could grep for /usr/bin or /usr/sbin in this case:

dpkg-query -L zfsnap|grep /usr/sbin

EDIT: Catch-all with fancy regexp ;)

dpkg-query -L zfsnap|egrep "(/usr)*/(s*)bin"
  • I could not add a comment to the other answer due to lack of reputation, sorry ;) – jr98 Jul 21 '16 at 9:53
  • I'd just grep bin, but dpkg -L is precisely what I needed. – Jonathan Y. Jul 21 '16 at 13:04
»» $ zfsnap
zfsnap: command not found ««

The package zfsnap provides /usr/sbin/zfSnap : Please note the upper case S in zfSnap.

Spelling, 1) Read the file list with dpkg -L zfsnap 2) Read online http://packages.ubuntu.com/xenial/all/zfsnap/filelist

  • Terrific! Just for future reference, however, how should one deduce that? dpkg -S zfsnap only finds the documentation (but, that is how the documentation entries are spelled); where's the clue that the executable of the zfsnap package is spelled zfSnap? – Jonathan Y. Jul 21 '16 at 9:24
  • Please read my edited answer. – Knud Larsen Jul 24 '16 at 14:52
  • Thanks; if I hadn't up-voted already, I would now (@jr98 also mentioned the -L flag, so I don't want to un-accept his/her answer) – Jonathan Y. Jul 24 '16 at 14:58

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.