Ubuntu 18 命令 apt-get dist-upgrade -qq --force-yes 已弃用

Ubuntu 18 命令 apt-get dist-upgrade -qq --force-yes 已弃用

当我尝试

sudo apt-get dist-upgrade -qq --force-yes
W: --force-yes is deprecated, use one of the options starting with --allow instead.

然后尝试了建议的:

sudo apt-get dist-upgrade -qq --allow
E: Command line option --allow is not understood in combination with the other options

那么如何使用上述命令?

答案1

根据消息中所述,建议您使用选项从...开始 --allow

查看apt-get̀手册页,您将发现类似以下选项:

  • --allow-downgrades
  • --allow-remove-essential
  • --allow-unauthenticated

等等。

当你查看--force-yes选项描述时,你还可以发现有趣的信息:

       --force-yes
           Force yes; this is a dangerous option that will cause apt to continue without prompting if it is doing something potentially harmful. It should not be used
           except in very special situations. Using force-yes can potentially destroy your system! Configuration Item: APT::Get::force-yes. This is deprecated and
           replaced by --allow-unauthenticated , --allow-downgrades , --allow-remove-essential , --allow-change-held-packages in 1.1.

相关内容