Is it possible to download snaps and install them on another machine that doesn't have internet access? Or do I always need the snap store/snap command in the console?


The offline system needs snapd (the snap command).
The offline systen needs the snap itelf.
The offline system does NOT need the snap store.

From https://forum.snapcraft.io/t/offline-snap-installers-and-possibility-to-update/275 :

$ snap download hello-world
Fetching snap "hello-world"
Fetching assertions for "hello-world"
kyrofa@Pandora:~$ sudo snap ack hello-world_27.assert 
kyrofa@Pandora:~$ sudo snap install hello-world_27.snap
hello-world 6.3 from 'canonical' installed
kyrofa@Pandora:~$ snap list
Name                   Version                   Rev   Developer      Notes
hello-world            6.3                       27    canonical      -

The key to offline snaps is that you must manipulate the snapd database manually to tell it about packages and updates. That's the 'snap ack' command.

The following ack from the example means: Hey, database, a local package called hello-world27.snap exists in my current working directory. If the downloaded package is somewhere else, add the full path.

 $ sudo snap ack hello-world_27.assert 

The manpage for snapd explains a bit more about ack:

   Add an assertion to the system

   The ack command tries to add an assertion to the system assertion data‐

   The assertion may also be a newer revision of a pre-existing  assertion
   that it will replace.

   To  succeed  the assertion must be valid, its signature verified with a
   known public key and the assertion consistent with and its prerequisite
   in the database.

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.