为什么卸载相应的软件包后,/etc/init.d 中的 initd 脚本仍然存在?

Kar*_*ter 5 package-management init.d scripts init systemd

软件包irqbalance提供了一个initd脚本/etc/init.d/irqbalance,该脚本在软件包卸载后仍然存在apt-get remove,需要由systemd其他init管理员进行评估。删除所有依赖项后该脚本的用途是什么?

我使用的是 Ubuntu 16.10。

use*_*733 6

man apt-get

消除

 remove is identical to install except that packages are removed
 instead of installed. Note that removing a package leaves its
 configuration files on the system. If a plus sign is appended to
 the package name (with no intervening space), the identified
 package will be installed instead of removed.
Run Code Online (Sandbox Code Playgroud)

清除

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

“配置文件”是指“/etc 中的文件”

  • apt remove将文件保留在 /etc 中,包括初始化脚本。当您有可能重新安装并且不想浪费大量时间重建出色的配置时,请使用“删除”。

  • apt purge删除 /etc 文件。一去不复返。

  • 永远remove也不会purge删除 /home 中的任何文件。这些是你的问题,而不是 apt 的问题。

这与初始化脚本有何关系?除了明显的(在 /etc 中)之外,您还可以通过两种方式查看它: init 脚本配置应用程序启动和停止的时间和方式...或者将 init 配置为在您希望时启动和停止应用程序。