Ubuntu – Snap uninstallation process fails

16.04snap

I installed ubuntu-clock-app. Once I had to emergency turn off my computer (hard reset), this application has stopped working.

datafile4@datafile4-K53SD:~$ sudo snap remove ubuntu-clock-app
error: can't remove "ubuntu-clock-app": cannot find mounted snap "ubuntu-clock-app" at revision 5

At the same time

datafile4@datafile4-K53SD:~$ sudo snap install ubuntu-clock-app
error: can't install "ubuntu-clock-app": snap "ubuntu-clock-app" already installed

snap changes result:

Status  Spawn                 Ready                 Summary
Done    2016-05-01T07:51:19Z  2016-05-01T07:51:20Z  Make snap "ubuntu-clock-app" unavailable to the system
Undone  2016-05-01T07:51:19Z  2016-05-01T07:51:21Z  Remove security profile for snap "ubuntu-clock-app"
Done    2016-05-01T07:51:19Z  2016-05-01T07:51:20Z  Remove data for snap "ubuntu-clock-app"
Error   2016-05-01T07:51:19Z  2016-05-01T07:51:20Z  Remove snap "ubuntu-clock-app" from the system
Hold    2016-05-01T07:51:19Z  2016-05-01T07:51:20Z  Discard interface connections for snap "ubuntu-clock-app"

......................................................................
Remove snap "ubuntu-clock-app" from the system

2016-05-01T11:51:20+04:00 ERROR remove /snap/ubuntu-clock-app/5/bin/clock: read-only file system

Best Answer

One way out of this, if you don't care to lose the data associated with the snaps, is to run Zyga's reset state script.

Also, please make sure you're on snapd 2.0.3, which was released to xenial last week; that way you shouldn't get into this state again.