apt-get remove -y 和 apt-get purge -y 之间的区别?

use*_*774 3 package-management command-line apt

apt-get remove <name of program>  

apt-get purge <name of program>
Run Code Online (Sandbox Code Playgroud)

apt-get purge -y <name of program>
Run Code Online (Sandbox Code Playgroud)

研究表明运行“删除”或“清除”执行完全相同的功能,并且它们是可互换的命令。

运行该命令apt-get purge -y <name of program>会删除程序及其依赖项。

IOW,此命令是删除与该程序严格关联的依赖项还是删除可能导致其他程序停止工作的共享依赖项?

我应该运行哪个来删除程序?purge或者purge -y

Mit*_*tch 7

apt-get remove 删除有问题的包

apt-get purge相当于apt-get remove --purge并将删除用户数据/配置文件。

来自man apt-get

   purge
       purge is identical to remove except that packages are removed and purged (any configuration files are deleted too).
Run Code Online (Sandbox Code Playgroud)

   --purge
       Use purge instead of remove for anything that would be removed. An asterisk ("*") will be displayed next to packages which are scheduled to be purged.  remove --purge is equivalent to the purge command. Configuration Item: APT::Get::Purge.
Run Code Online (Sandbox Code Playgroud)

-y标志告诉命令在没有确认琐碎问题的情况下继续进行。再次,来自man apt-get

   -y, --yes, --assume-yes
       Automatic yes to prompts; assume "yes" as answer to all prompts and run non-interactively. If an undesirable situation, such as changing a held package, trying to install a unauthenticated package or removing an essential package occurs then apt-get will abort. Configuration Item: APT::Get::Assume-Yes.
Run Code Online (Sandbox Code Playgroud)


归档时间:

查看次数:

11691 次

最近记录:

10 年,9 月 前