禁用Ubuntu Release TLS更新

在使用ubuntu进行开发,会有如下提示

Welcome to Ubuntu 12.04.5 LTS (GNU/Linux 3.4.0-030400-generic i686)
 * Documentation:  https://help.ubuntu.com/
New release '14.04.1 LTS' available.
Run 'do-release-upgrade' to upgrade to it.

禁用方法:
vim /etc/update-manager/release-upgrades
设置Prompt=never

    $ sudo systemctl stop apt-daily.service
    $ sudo systemctl stop apt-daily.timer
    $ sudo systemctl stop apt-daily-upgrade.service
    $ sudo systemctl stop apt-daily-upgrade.timer
    $ sudo systemctl disable apt-daily.service
    $ sudo systemctl disable apt-daily.timer
    $ sudo systemctl disable apt-daily-upgrade.service
    $ sudo systemctl disable apt-daily-upgrade.timer


或者修改自动更新程序的配置文件也可以,同时更新 /etc/apt/apt.conf.d/10periodic 和 /etc/apt/apt.conf.d/20auto-upgrades:

    APT::Periodic::Update-Package-Lists "1";
    APT::Periodic::Unattended-Upgrade "1";

改为

    APT::Periodic::Update-Package-Lists "0";
    APT::Periodic::Unattended-Upgrade "0";

posted on 2023-10-16 14:34  sudochen  阅读(32)  评论(0编辑  收藏  举报

导航