Remove unused core and extension snaps

Over time quite a few snaps have accumulated on my system that got installed as a dependency for application snaps. E.g. there are multiple cores (core, core18, core20, core22) and extension snaps (such as gnome-3-38-2004, gtk-common-themes, kde-frameworks-5-96-qt-5-15-5-core20).

Is there some efficient way to figure out which of those snaps are indeed not used anymore by any of the installed snaps and can be safely removed?