某些apt
安装命令(如apt-get install kate
)会提示确认,而其他命令则不会。
这有什么原因吗?
答案1
apt-get
基本上在两种情况下要求确认。
- 当它需要做的事情超出了直接要求做的事情时,以满足所提出的要求。例如,如果您要求安装或删除某个软件包,如果它需要执行涉及未明确提及的其他软件包的操作,无论该操作是安装还是删除,它都会首先要求确认。
当它被要求执行可能对系统有害的操作时。例如,尝试删除重要的软件包将触发此警告。
# apt-get remove apt [...] WARNING: The following essential packages will be removed. This should NOT be done unless you know exactly what you are doing! apt 0 upgraded, 0 newly installed, 27 to remove and 4 not upgraded. After this operation, 12.5 MB disk space will be freed. You are about to do something potentially harmful. To continue type in the phrase 'Yes, do as I say!' ?]