root@cd:~# sudo find / -iname 'mysql*' -exec rm -rf {} \;
find: ‘/run/user/1000/gvfs’: Permission denied
rm: cannot remove '/snap/core/8039/etc/apparmor.d/abstractions/mysql': Read-only file system
rm: cannot remove '/snap/core/8039/usr/share/bash-completion/completions/mysql': Read-only file system
rm: cannot remove '/snap/core/8039/usr/share/bash-completion/completions/mysqladmin': Read-only file system
rm: cannot remove '/snap/core/7917/etc/apparmor.d/abstractions/mysql': Read-only file system
rm: cannot remove '/snap/core/7917/usr/share/bash-completion/completions/mysql': Read-only file system
rm: cannot remove '/snap/core/7917/usr/share/bash-completion/completions/mysqladmin': Read-only file system
rm: cannot remove '/snap/core18/1265/etc/apparmor.d/abstractions/mysql': Read-only file system
rm: cannot remove '/snap/core18/1223/etc/apparmor.d/abstractions/mysql': Read-only file system
答案1
这是基于其位置的 snap。Snap 是沙盒化的,正确的移除方法是执行sudo snap remove mysql
答案2
快照全部以只读方式安装。
检查这个命令:
mtodorov@efk:~$ mount | grep snaps
/var/lib/snapd/snaps/hello_20.snap on /snap/hello/20 type squashfs (ro,nodev,relatime,x-gdu.hide)
/var/lib/snapd/snaps/canonical-livepatch_88.snap on /snap/canonical-livepatch/88 type squashfs (ro,nodev,relatime,x-gdu.hide)
/var/lib/snapd/snaps/hello_38.snap on /snap/hello/38 type squashfs (ro,nodev,relatime,x-gdu.hide)
/var/lib/snapd/snaps/core_8039.snap on /snap/core/8039 type squashfs (ro,nodev,relatime,x-gdu.hide)
/var/lib/snapd/snaps/canonical-livepatch_90.snap on /snap/canonical-livepatch/90 type squashfs (ro,nodev,relatime,x-gdu.hide)
/var/lib/snapd/snaps/core_7917.snap on /snap/core/7917 type squashfs (ro,nodev,relatime,x-gdu.hide)
mtodorov@efk:~$
如你所见,所有快照都有第一个选项ro
之中(ro,nodev,relatime,x-gdu.hide)
安装选项,这是“只读”的简写。
希望这可以帮助。