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

mas*_*boo 0 linux ubuntu

当我尝试作为

sudo apt-get dist-upgrade -qq --force-yes
W: --force-yes is deprecated, use one of the options starting with --allow instead.
Run Code Online (Sandbox Code Playgroud)

然后尝试建议为:

sudo apt-get dist-upgrade -qq --allow
E: Command line option --allow is not understood in combination with the other options
Run Code Online (Sandbox Code Playgroud)

那么如何使用上面的命令呢?

小智 5

如消息中所述,建议您使用以开头 的选项--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.
Run Code Online (Sandbox Code Playgroud)