It seems like the manual disconnect is “remembered” even after removing a snap. Is this intended behavior? Is there any way to “forget” a previously manually removed auto-connection?
I found it very unexpected that it remembered my disconnection, especially after removing using the purge flag.
In order to make this less unexpected and more visible to users I propose two tweaks:
Give manual disconnects the Manual label in snap connections, like the command does for manual connects. Currently there is no way of knowing whether a slot is manually disconnected.
Have snap remove --purge also forget manual connects and disconnects. apt purge also removes any configuration of an app.
Hmm, historically --purge was just about removing data, not necessarily state. Perhaps when a snap is removed the disconnection should always be removed/forgotten and the fact that it is not is a bug…
Is there other state that is saved after a snap is removed? I think as long as state persists after --purge, people will be confused about it, because it had such a specific meaning in apt. But if a normal remove also removes all state, then that issue is solved.
Note: I don’t see old snapshots as “persisting state” because a snapshot is not automatically reverted when you re-install an app
It seems this command is only included in snapd 2.45. I installed it from the edge channel and the UX of undesirable connections seems really weird.
snap disconnect --forget requires an enabled connection to work. So you can’t use this command to forget an undesired connection.
When you manually connect an undesired connection, it becomes a manual connection. When you remove that manual connection, it is simply removed; it does not become undesired again. So on the next snap refresh, it will be connected again. This seems like a security issue…
Can you file a bug detailing the steps you took and what you expected to happen? AFAIK your use case is exactly what we designed snap disconnect --forget for so if it’s not working then probably there’s a bug somewhere
I started a PR for showing undesirable connections, but I’m not sure what the actual output should be. I created an RFC here: RFC: Showing undesired connections