Get Snap package and dependencies size before installing

I would like to know how to get the size of a snap package including all the dependencies required. For example: I want to install package named “beautiful-day” and it’s only 200 KB in size but it depends on “200 MB” library.

I would like to know the total size that is going to be downloaded, I don’t want the size of components that are already installed to be shown.

3 Likes

the command:

snap info <snapname>

will show you the exact size on disk used by teh snap. note that snap packages are self contained, they typically ship all dependencies inside so they are runnable on all distros.

1 Like

The command to get size of snap is good, But it does not list the size of content snap nor describe it depends on some content snaps.

One more thing that could be a separate topic is the information provided by snapd while installing a snap for example: snap install acrordrdc
will take forever and just says Automatically connect eligible plugs and slots of snap "acrordrdc" while downloading content snaps which are required. It will be nice to have neat information of what is being done. I know about snap tasks <id> command but that again is a separate command which is slow and user need to keep calling it to track the progress of task. There is one more command snap watch <id> which was I guess made to achieve the solution for this issue but it also shows what the main command is doing. i,e Automatically connect eligible plugs and slots of snap "acrordrdc" in this case.

2 Likes

you need to get a slower computer :stuck_out_tongue: … it prints output for each interface it connects but often the interfaces are simply so fast in succession that the messages overwrite each other … perhaps it should not print anything at all and at the end give you the change number and a hint to the snap changes command or some such …

1 Like

We do lack UI for inspecting what connections a snap would have auto-connected if you installed it and that’s something we want to make easy as it would encourage “exploring” new snaps you aren’t sure about if you can confirm for yourself what interfaces the snap uses without installing it. That in combination with something like my proposal here would also enable trying out snaps which you don’t trust because you could install them inside jailmode with no interfaces connected at all and rely on snapd confinement to trust that the app doesn’t do anything you don’t give it permission to do.

Getting the size of content snaps is probably out of scope for this, but knowing what content snaps would be installed if you installed a given snap a la interfaces that would be auto-connected and have default-providers definitely seem in scope for this.

Also this topic should move to #snapd category and be tagged “backlog”. I seem to have lost my ability to move topics around and tag them unfortunately…

3 Likes

2 Years later: The above mentioned issue is also described here in details snap(CLI) install behaviour with snap that also download their runtime as content snap