After a snap has been installed with sudo snap install [package] how can I list the files which have been installed by the snap?

up vote 20 down vote accepted

Snaps are compressed squashfs files, which typically get 'installed' to /var/lib/snapd/snaps. So if you snap install ohmygiraffe you'll find a file called /var/lib/snapd/snaps/ohmygiraffe_3.snap.

If you'd never installed a snap before then you'll also have a core snap which lives at the same location.

If you're interested in seeing what's inside that snap, look in /snap/<snapname>/<current>/. Note that you're peering into the snap, the contents aren't unpacked onto your filesystem.

The only other thing you'll find is a .desktop file in /var/lib/snapd/desktop/applications.

Once your snap has been run, you may also find data in ~/snap/<snapname>.

Snaps are standalone squashfs images, which means listing what they install is as simple as listing the contents of the image. These images get mounted into place at /snap/<snapname>/<snap revision>, although you can just use /snap/<snapname>/current for the currently-active revision, e.g.:

$ ls -lR /snap/<snapname>/current/

Your Answer

 

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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