I know that with debian packages, packages can be marked as auto or manual. I can list manually installed packages and remove all automatically installed ones that that aren't depended on by manually installed ones.
Is there something similar with snap? "snap list" shows all installed snaps, including things I never installed, such as core or gtk-themes. I couldn't find any way in "man snap" to list only the manually installed ones. I'm also not sure what prevents no longer needed automatically installed snaps from cluttering up my system.
I wanted to write a simple shell script for declarative package management in ubuntu. The idea is to have a list of manually installed packages in a file under version control and have the script mark installed packages not on the list as automatic and install those in the list but not installed.
So far it seems to work with debs. But it doesn't work with snaps, because I don't now how to get a list of manually installed snaps. I don't want to add snaps like core or gtk-themes to the managed list.