Removing snap flashes (and sometimes locks) mount on Unity launcher

I noticed recently on my 16.04 desktop that when I remove a snap, a “mounted folder” icon temporarily shows up on my Unity launcher bar. Usually it goes away in a short period, but I’ve occasionally had it end up locked and have to right-click and unlock. It’s possible that latter behavior only happens if I inadvertently click it before it automatically removes, which would be fine. But I’m confused why it shows up at all, as others have said they have never seen that?

you can remove snap packages with

sudo snap remove < package >

That doesn’t answer the question, unfortunately, he asked why there’s a Unity Launcher icon that comes up when a snap is installed.

It’s because snaps are actually squashfs filesystems (as I understand it) which means that every time you install a snap you’re downloading a filesystem that the OS then immediately mounts (you can see the list of snappy filesystems in the System Monitor application under File Systems, though I’m not sure if that tab exists in 16.04). Because you’re mounting a filesystem, the Launcher displays that filesystem briefly. It would be better if the Unity Launcher essentially ignored snappy filesystems, but Unity is no longer developed by Canonical (though it’s still maintained by them for 14.04 and 16.04), so it may be a while before it gets fixed (though you could file a bug against Unity for this with ubuntu-bug unity). I can’t remember if the Ubuntu Dock does a similar thing, because that should be fixed if it does.

I think I read somewhere from a dev, but I can’t remember where, that loop devices will be hidden in System Monitor at some point, this would provide ample precedent for hiding them from the Unity Launcher too, if one could find that comment and reference it…