如何删除 wireguard

如何删除 wireguard

我的操作系统是 ubuntu 20

我尝试删除 wireguard

sudo apt remove wireguard
sudo apt autoclean && sudo apt autoremove
Package 'wireguard' is not installed, so not removed
0 upgraded, 0 newly installed, 0 to remove and 3 not upgraded.
$ locate wireguard

/snap/core18/2667/usr/lib/python3/dist-packages/cloudinit/config/__pycache__/cc_wireguard.cpython-36.pyc
/snap/core18/2667/usr/lib/python3/dist-packages/cloudinit/config/cc_wireguard.py
/snap/core20/1778/usr/lib/python3/dist-packages/cloudinit/config/__pycache__/cc_wireguard.cpython-38.pyc
/snap/core20/1778/usr/lib/python3/dist-packages/cloudinit/config/cc_wireguard.py
/snap/core22/484/usr/lib/python3/dist-packages/cloudinit/config/__pycache__/cc_wireguard.cpython-310.pyc
/snap/core22/484/usr/lib/python3/dist-packages/cloudinit/config/cc_wireguard.py
/usr/lib/modules/5.15.0-57-generic/kernel/drivers/net/wireguard
/usr/lib/modules/5.15.0-57-generic/kernel/drivers/net/wireguard/wireguard.ko
/usr/lib/modules/5.15.0-58-generic/kernel/drivers/net/wireguard
/usr/lib/modules/5.15.0-58-generic/kernel/drivers/net/wireguard/wireguard.ko
/usr/share/doc/netplan/examples/wireguard.yaml
/usr/src/linux-hwe-5.15-headers-5.15.0-57/drivers/net/wireguard
/usr/src/linux-hwe-5.15-headers-5.15.0-57/drivers/net/wireguard/Makefile
/usr/src/linux-hwe-5.15-headers-5.15.0-57/include/uapi/linux/wireguard.h
/usr/src/linux-hwe-5.15-headers-5.15.0-57/tools/testing/selftests/wireguard
/usr/src/linux-hwe-5.15-headers-5.15.0-57/tools/testing/selftests/wireguard/netns.sh
/usr/src/linux-hwe-5.15-headers-5.15.0-57/tools/testing/selftests/wireguard/qemu
/usr/src/linux-hwe-5.15-headers-5.15.0-57/tools/testing/selftests/wireguard/qemu/Makefile
/usr/src/linux-hwe-5.15-headers-5.15.0-58/drivers/net/wireguard
/usr/src/linux-hwe-5.15-headers-5.15.0-58/drivers/net/wireguard/Makefile
/usr/src/linux-hwe-5.15-headers-5.15.0-58/include/uapi/linux/wireguard.h
/usr/src/linux-hwe-5.15-headers-5.15.0-58/tools/testing/selftests/wireguard
/usr/src/linux-hwe-5.15-headers-5.15.0-58/tools/testing/selftests/wireguard/netns.sh
/usr/src/linux-hwe-5.15-headers-5.15.0-58/tools/testing/selftests/wireguard/qemu
/usr/src/linux-hwe-5.15-headers-5.15.0-58/tools/testing/selftests/wireguard/qemu/Makefile
/var/lib/dpkg/info/wireguard-tools.list
/var/lib/dpkg/info/wireguard-tools.postrm

我尝试删除文件

$ rm -rf cloudinit

rm: cannot remove 'cloudinit/__init__.py': Read-only file system
rm: cannot remove 'cloudinit/__pycache__/__init__.cpython-36.pyc': Read-only file system

答案1

从技术角度来说,Wireguard从系统中移除。你看到的残留内容cloudinit(是折断所以你不能直接删除文件)并且在你看到的内核包中(用于开发目的的头文件和源代码以及通过 DKMS 等编译的驱动程序)是内核级组件Wireguard 所依赖的组件被嵌入到内核和其他软件包中。

文件名、测试、驱动程序等中的存在wireguard并不意味着 Wireguard 已安装在您的系统上。如果您已完成安装,sudo apt purge wireguard wireguard-tools则可以放心地忽略“已定位文件”的 res。另请注意,locate命令是不是实时更新- 它每天仅在启动时更新一次,因此您可能会看到实际上不再存在的文件或类似文件。

可以这么说,如果您删除了该wireguard软件包,wireguard 就不再存在于您的系统中,尽管在其他文件名等中引用了它,但这并不表明它仍然存在于您的系统中。

答案2

我从桌面管理 WireGuard VPN 中删除

https://extensions.gnome.org/extension/3612/wireguard-indicator/

相关内容