apt-get install -y packagename
如果软件包已经安装,则更新软件包。我该如何防止这种情况发生?如果软件包已经安装,我不想更新它。对于 apt-get,应该使用什么开关来实现这一点?我查看了手册页,但找不到任何解决方案。
答案1
--no-upgrade
Do not upgrade packages; when used in conjunction with install,
no-upgrade will prevent packages on the command line from being
upgraded if they are already installed. Configuration Item:
APT::Get::Upgrade.