一、 apt-get remove packagename
该命令将移除与 packagename
相关联的所有二进制文件,但是不会移除与之相关联的配置文件或数据文件(configuration or data files),同样也不会移除 packagename
所依赖的包。
二、 apt-get purge packagename
或者 apt-get remove --purge packagename
这两条命令是 等价的。它们的作用是:移除与包 packagename
相关联的所有文件,这些文件包括二进制文件和全局配置文件。 注意,该命令不会移除 packagename
所依赖的包,也不会移除 位于用户家目录中的与 packagename
相关联的配置文件或数据文件。
当我们想要完全卸载程序时,此命令特别有用。因为我们在安装应用程序的过程中经常会遇到安装失败,需要重新安装,或者因为应用程序的配置文件杂乱无章,我们想要完全卸载应用程序,然后重新安装。然后,您可以使用此命令完全卸载应用程序所在的包。
[En]
This command is especially useful when we want to uninstall a program completely. Because we often encounter installation failure in the process of installing an application, we need to reinstall it, or because the configuration file of an application is messy, we want to uninstall the application completely and then reinstall it. Then you can use this command to completely uninstall the package where the application is located.
三、 apt-get autoremove
卸载当前系统中的所有孤立的包(remove orphaned packages),具体指那些 曾经被其他包所依赖,但是现在不被任何包依赖了的包。例如,我们用 apt-get remove --purge packagename
卸载了 packagename
,但是 packagename
所依赖的包还保留在系统中,这时我们就可以用命令 apt-get autoremove
来卸载这些依赖包。注意,这条命令卸载的依赖包一定指的是 孤立的包,即不再被任何包给依赖了的包。
四、 aptitude remove packagename
或者 aptitude purge packagename
上面两条命令也会卸载被 packagename
依赖但是不被系统中其他包依赖的包。
五、 apt-get -s remove packagename
这条命令将模拟卸载 pacagename
包,但是不会真的卸载。一般在卸载某个包之前,我们先用这条命令来查看一下卸载过程中会卸载哪些内容,防止因为拼错包名 packagename
而卸载了不是我们意图卸载的包。
Original: https://www.cnblogs.com/letsplayball/p/15559189.html
Author: 拍呀拍皮球
Title: apt-get指令关于卸载软件的各种用法
原创文章受到原创版权保护。转载请注明出处:https://www.johngo689.com/524359/
转载文章受原作者版权保护。转载请注明原作者出处!