Okay I found the problem - a detached tmux session was still running inside the container.
The way you actually find this is to run `systemctl-cgls` and then look for the cgroup belonging to the snap. It will be something like `snap.clion.clion.e566369e-6a51-4497-84ba-d4f52f65291b.scope` and the processes running inside it will be listed directly below. Snapd wants there to be no processes in the cgroup before it will do the refresh.
Okay I found the problem - a detached tmux session was still running inside the container.
The way you actually find this is to run `systemctl-cgls` and then look for the cgroup belonging to the snap. It will be something like `snap.clion. clion.e566369e- 6a51-4497- 84ba-d4f52f6529 1b.scope` and the processes running inside it will be listed directly below. Snapd wants there to be no processes in the cgroup before it will do the refresh.