In DEB package, it is not possible to install an application in offline (in a computer which does not have any internet access). Because of the dependencies. In case of .snap, according to the OMG!Ubuntu, Snap packages can contain both application binary and any dependencies required for it to run.
Does it mean that, any .snap application can be installed in an offline pc (like the .dmg in MacOSX)? As there is no need to fetch any dependencies from the source.
It seems you first have to download and install the ubuntu-core snap before you can do offline installs for any other snaps. For me this worked:
Run the following commands on an online Ubuntu system:
This will put the following files in your current directory:
Copy these files to the offline system, then install them (from the directory they were copied to):
This should solve the problem @lane had where it tried to connect to the internet while installing a local .snap file.
First of all, you can indeed install debs offline:
However, you're right in that it doesn't take into account the deb's dependencies-- you actually need to have the deb and all its dependencies available offline in order to successfully install it:
So yes, installing a snap offline is very easy, and all you need to have is that single snap (since as you know, it includes its dependencies):