Cannot --purge snap nextcloud

Nextcloud version (eg, 29.0.5): 27.1.9snap1
Operating system and version (eg, Ubuntu 29.04): Ubuntu 22.04.4 LTS

The issue you are facing:

After having something broken in my nextcloud snap package, I tried to cleanly uninstall and reinstalling it, but i’m faced with the following error:

error: cannot perform the following tasks:
- Remove data for snap "nextcloud" (42230) (failed to remove snap "nextcloud" base directory: remove /root/snap/nextcloud: directory not empty)

I don’t know what else to do, since trying to get rid of that directory just by “rm -rf” obviously gives me an error, since they are read-only files.

Is this the first time you’ve seen this error? (Y/N): Y

Steps to replicate it:

  1. run sudo snap remove --purge nextcloud

Not sure why you encountered that. You should be able to use sudo to clear the contents as well (e.g. sudo rm whatever)

The issue kind of “solved itself”. I still don’t know the reason of all those errors, but a specific update finally made the situation more stable, so I think the topic can be closed

1 Like

Did you follow: