首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >如何停止/禁用无人值守的自动启动升级?

如何停止/禁用无人值守的自动启动升级?
EN

Unix & Linux用户
提问于 2018-09-22 12:53:53
回答 1查看 42.4K关注 0票数 35

我最近在我的桌面PC上安装了Trisquel8.0LTS (Flidas),它在Trisquel7.0上运行了4年。系统变得非常缓慢。当我检查内存和CPU使用情况时,我发现CPU几乎是100 %的top,以查看出了什么问题,并发现unattended-upgr正在消耗整个CPU。

我试着用sudo kill 1803用PID杀死它,但是过了一段时间,它又自动启动了。我知道无人值守的升级是为了自动安装重要的安全更新,但我需要禁用它被自动启动。

我该怎么做?

EN

回答 1

Unix & Linux用户

回答已采纳

发布于 2018-09-22 13:29:09

您需要按以下方式停止自动更新程序:

运行以下命令

代码语言:javascript
复制
sudo dpkg-reconfigure -plow unattended-upgrades

您将看到配置无人参与的提示符-升级:

选择No禁用自动下载和安装更新并按Enter键。

这将更新配置文件/etc/apt/apt.conf.d/20auto-upgrades,将APT::Periodic::Unattended-Upgrade设置为"0"

代码语言:javascript
复制
  $ sudo dpkg-reconfigure -plow unattended-upgrades
  Replacing config file /etc/apt/apt.conf.d/20auto-upgrades with new version
  $ cat /etc/apt/apt.conf.d/20auto-upgrades
  APT::Periodic::Update-Package-Lists "0";
  APT::Periodic::Unattended-Upgrade "0";

有关配置包的详细信息,请参阅man dpkg-重新配置

代码语言:javascript
复制
--configure package...|-a|--pending
          Configure a package which has been unpacked but not yet  config‐
          ured.   If  -a  or  --pending  is  given instead of package, all
          unpacked but unconfigured packages are configured.

          Configuring consists of the following steps:

          1.  Unpack  the  conffiles, and at the same time back up the old
          conffiles, so that they can be restored if something goes wrong.

          2. Run postinst script, if provided by the package

dpkg-reconfigure - reconfigure an already installed package

   -pvalue, --priority=value
       Specify the minimum priority of question that will be displayed.
       dpkg-reconfigure normally shows low priority questions no matter
       what your default priority is. See debconf(7) for a list.

   -a, --all
       Reconfigure all installed packages that use debconf. Warning: this
       may take a long time.

--no-reload
           Prevent dpkg-reconfigure from reloading templates. Use with caution; this will prevent
           dpkg-reconfigure from repairing broken templates databases.  However, it may be useful
           in constrained environments where rewriting the templates database is expensive.
票数 48
EN
页面原文内容由Unix & Linux提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://unix.stackexchange.com/questions/470709

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档