How to tell/track where snaps install things?

I have a particualr use case, Qubes, which makes installing to anywhere other than the ~/ tricky. But, as there are some apps that are only available as snaps (for linux) I am quite keen on using snaps at least for these apps.

That said, is there a way to know before installing if the snap requires putting things in locations other than ~/ and if not, then how can I track where the snap is installing things?


There’s a blog post about exactly where snaps store data here that might be of interest to you:

but to answer your question, there isn’t a way to tell ahead of time where a snap will try to store it’s data, but the locations that snaps can persistently store their data is:

  • /var/snap/<name>/{common,current}
  • /home/<user>/snap/<name>/{common,current}
  • /root/snap/<name>/{common,current}
  • /home/<user>/ (if the home interface is connected)
  • /mnt/ (if the removable-media interface is connected)
  • /media/ (if the removable-media interface is connected)

along with what ian said, the snap files temselves as well as their package metadata (seed.yaml, assertions, .desktop files etc) go into directories underneath /var/lib/snapd if you install a snap …

Thank you very much!
2 quick questions.

  1. for /root is that only if it is installed as root? or if as a user i install it there still might be some things put in /root?
  2. In a previous post one of the errors seemed to indicate that some snaps something was not in /dev/ which seemed to be the case when i looked in /dev/ (I believe you helped me with that?). Is that a “general” snaps thing or would it be more on a package by package basis (ie some packages do, others dont).

/root is used if a snap has a daemon that tries to write to $HOME or if the root user runs a snap command that writes to $HOME, i.e. sudo snap run hello-world I should have clarified that /root is only accessible if the snap has the home interface connected.

/dev is necessary to setup snap confinement, so in order to run any snap you need to have /dev setup properly - in your case it was not an issue with /dev, but with the base snap. The error message was misleading in this case.

Got it, thanks again!