To know which packages depend on a specific package, I can run:
$ apt rdepends <package>
example:
$ apt rdepends netcat-openbsd
netcat-openbsd
Reverse Depends:
Recommends: libvirt-daemon
Recommends: libvirt-daemon
Depends: xletters
Depends: tomcat10-user
|Depends: rtpengine-utils
Suggests: mariadb-server
|Depends: ifupdown-extra
Depends: freedombox
Depends: ubuntu-minimal
Snap packages don't typically have as many dependencies outside of core/gnome, but this is still wanted in some cases.
For example, if I have multiple snap core packages, it isn't obvious how to identify which snaps depend on a specific version of core.
Name Version Rev Tracking Publisher Notes
...
core18 20240416 2823 latest/stable canonical✓ base
core20 20240416 2318 latest/stable canonical✓ base
core22 20240408 1380 latest/stable canonical✓ base
...
While specific example has already been answered[1] elsewhere, it isn't a generic solution. Answering this question for snaps which depend on gnome and gtk themes are not answered in that question.
[1] Expecting the user to understand the snap configuration file and read these files on disk makes this feel like an afterthought to snap's user interface.
grep "base:" /snap/*/*/meta/snap.yaml– Artur Meinild May 16 '24 at 09:04grep "default-provider:" /snap/*/*/meta/snap.yaml– Artur Meinild May 16 '24 at 09:36baseanddefault-providerwill give you the info you need. And no, it's not very pretty, and yes it's an afterthought, but it's what is possible. You can make your own script to make it more pretty. This would be an excellent opportunity to delve into bash scripting. – Artur Meinild May 16 '24 at 09:37default-providermeans? The question doesn't clarify what that term means. Also, Google search results on this term don't point to anything that resembles useful documentation on what it is. – Brett Holman May 16 '24 at 09:52default-providershows the other dependencies which are notbase. I thought that is pretty obvious from the very detailed answer. In any case, I believe it will show everything you need for your question to be answered. – Artur Meinild May 16 '24 at 09:54