Can not completely remove incus & reinstall

Aside from my reason to do so, I wanted to purge incus and then reinstall.
So I executed:

$ sudo apt purge incus*

It starts to look like a normal package purge but then I see a lot of “read-only file system”
such as this small sample of output:

rm: cannot remove ‘/var/lib/incus/storage-pools/incus-pool/images/53abb9d01e1176d9fa55619f0b281f1dad50936b889b63d14aad1f7325626ded/rootfs/v
ar/spool/cron/crontabs’: Read-only file system
rm: cannot remove ‘/var/lib/incus/storage-pools/incus-pool/images/53abb9d01e1176d9fa55619f0b281f1dad50936b889b63d14aad1f7325626ded/rootfs/v
ar/spool/mail’: Read-only file system
rm: cannot remove ‘/var/lib/incus/storage-pools/incus-pool/images/53abb9d01e1176d9fa55619f0b281f1dad50936b889b63d14aad1f7325626ded/rootfs/v
ar/spool/rsyslog’: Read-only file system
rm: cannot remove ‘/var/lib/incus/storage-pools/incus-pool/images/53abb9d01e1176d9fa55619f0b281f1dad50936b889b63d14aad1f7325626ded/rootfs/v
ar/tmp’: Read-only file system

and it ends with:

dpkg: warning: while removing incus-base, directory ‘/var/lib/incus’ not empty so not removed

I ran… the following and nothing incus* is installed

$ apt list -a incus*
Listing… Done
incus-base/jammy 0.6-202403181629-ubuntu22.04 amd64
incus-base/jammy 0.6-202403020012-ubuntu22.04 amd64

incus-client/jammy 0.6-202403181629-ubuntu22.04 amd64
incus-client/jammy 0.6-202403020012-ubuntu22.04 amd64

incus-ui-canonical/jammy 0.6-202403181629-ubuntu22.04 amd64
incus-ui-canonical/jammy 0.6-202403020012-ubuntu22.04 amd64

incus/jammy 0.6-202403181629-ubuntu22.04 amd64
incus/jammy 0.6-202403020012-ubuntu22.04 amd64

= = = = =

even as ROOT I can’t delete /var/lib/incus?

$ sudo su

# rm -R /var/lib/incus
as it still says the directory /var/lib/incus is read-only

How do youcompletely remove incus and this storage pool so I can reinstall
and correct an error I made in the initial “incus admin init” ?

any ideas?

Hi,
Can you try with first stop the incus and incus-user services and sudo apt purge incus incus-base incus-client? What is your storage driver anyway?
Regards.

Based on the output above, I take it you’re using btrfs for storage?

btrfs is a bit odd in that you can get subvols that can’t be destroyed without manual action being needed, looks like that’s what’s going on here.

@stgraber
Yeah that seems like what is going on.

I’d just never seen that happen before.
I’ll delete it manually

Thx