5

Since I am using my servers in an offline environment I usually mirror the ubuntu archive - works perfectly! Now shocking I found that chromium-browser is a snap app in U20.04 LTS. So it does not install unless you are really connected to the internet. This renders the idea of apt-mirror completely useless.

I just wonder if there are any other apps using snap. And I like to know this before I continue migrating all servers.

Maybe I have to walk through each apt package and see if it has a snap dependency?

thx

mook765
  • 18,644
thomas
  • 879
  • 5
  • 11

2 Answers2

4

You can check the reverse dependencies of the snapd-package:

$ apt rdepends snapd | grep "Depends"

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

Reverse Depends: Depends: snap-confine (= 2.57.5+22.04ubuntu0.1) Depends: ubuntu-snappy-cli Depends: ubuntu-snappy Depends: ubuntu-core-snapd-units Depends: ubuntu-core-launcher (= 2.57.5+22.04ubuntu0.1) Depends: snapd-xdg-open (= 2.57.5+22.04ubuntu0.1) Depends: snap-confine (= 2.55.3+22.04) Depends: plasma-discover-backend-snap Depends: gnome-software-plugin-snap Depends: ubuntu-image Depends: livecd-rootfs (>= 2.39) Depends: ubuntu-snappy-cli Depends: ubuntu-snappy Depends: ubuntu-core-snapd-units Depends: ubuntu-core-launcher (= 2.55.3+22.04) Depends: snapd-xdg-open (= 2.55.3+22.04) PreDepends: snapcraft Depends: livecd-rootfs (>= 2.39) Depends: plasma-discover-backend-snap Depends: gnome-software-plugin-snap PreDepends: ember PreDepends: cyphesis-cpp PreDepends: chromium-browser Depends: ubuntu-server-minimal Depends: ubuntu-image PreDepends: firefox

We could even shorten the list if we look for PreDepends:

~$ apt rdepends snapd | grep "PreDepends"

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

PreDepends: snapcraft PreDepends: ember PreDepends: cyphesis-cpp PreDepends: chromium-browser PreDepends: firefox

This are the transitional packages which install the applications as a snap package. The output may differ depending on the Ubuntu version you use.

mook765
  • 18,644
2

Most of apt packages can't have snap apps as dependency(unless it is a Transitional package) and most of snap apps can't have apt packages as dependency(only snapd).

Extra helpful commands:

Use snap info <app> to see info about snap apps and apt info <package> to see info about apt packages.

Use snap list to see all packages installed by snap and apt list --installed to see all packages installed by apt, it can be a very long list.

Mandi
  • 2,116