disable ubuntu 24.04 esm-apps info while apt uprade

After running apt upgrade, useless info shown:

bash 复制代码
# apt upgrade
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Calculating upgrade... Done
Get more security updates through Ubuntu Pro with 'esm-apps' enabled:
  libavcodec60 libavutil58 libswresample4
Learn more about Ubuntu Pro at https://ubuntu.com/pro
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

how to solve:

bash 复制代码
root@hp:/home/aoy# grep pro -r /etc/apt/

# mv all the esm file to /tmp

/etc/apt/preferences.d.save/ubuntu-pro-esm-apps:# This file is used by Ubuntu Pro and supplied by the ubuntu-pro-client
/etc/apt/preferences.d.save/ubuntu-pro-esm-infra:# This file is used by Ubuntu Pro and supplied by the ubuntu-pro-client
/etc/apt/sources.list.d/ubuntu.sources.curtin.orig:##   <name>-updates   - Major bug fix updates produced after the final release of the
/etc/apt/sources.list.d/ubuntu.sources.curtin.orig:##                      newer versions of some applications which may provide useful features.
/etc/apt/sources.list.d/ubuntu.sources.curtin.orig:##   restricted  - Software that may not be under a free license, or protected by patents.
/etc/apt/preferences.d/ubuntu-pro-esm-apps:# This file is used by Ubuntu Pro and supplied by the ubuntu-pro-client
/etc/apt/preferences.d/ubuntu-pro-esm-infra:# This file is used by Ubuntu Pro and supplied by the ubuntu-pro-client
/etc/apt/apt.conf.d/50command-not-found:## This file is provided by command-not-found(1) to download
/etc/apt/apt.conf.d/50unattended-upgrades://	"${distro_id}:${distro_codename}-proposed";
/etc/apt/apt.conf.d/50unattended-upgrades:// Send email to this address for problems or packages upgrades
/etc/apt/apt.conf.d/50unattended-upgrades:// have a working mail setup on your system. A package that provides
/etc/apt/apt.conf.d/50appstream:## This file is provided by appstreamcli(1) to download DEP-11

after that , the esm info still shown

so

bash 复制代码
# cat /etc/apt/apt.conf.d/20apt-esm-hook.conf
APT::Update::Pre-Invoke {
	"[ ! -e /run/systemd/system ] || [ $(id -u) -ne 0 ] || systemctl start --no-block apt-news.service esm-cache.service || true";
};

binary::apt::AptCli::Hooks::Upgrade {
	"[ ! -f /usr/lib/ubuntu-advantage/apt-esm-json-hook ] || /usr/lib/ubuntu-advantage/apt-esm-json-hook || true";
};


# mv /etc/apt/apt.conf.d/20apt-esm-hook.conf /tmp/

after this, the info not exist, it very clear

bash 复制代码
# ps:

i try to remove the `apt-news.service esm-cache.service  `

but none of them exists




```bash


root@hp:~# systemctl  list-units | grep -i  esm
root@hp:~# systemctl  list-units | grep -i  apt
  apt-daily-upgrade.timer                                                                  loaded active waiting   Daily apt upgrade and clean activities
  apt-daily.timer                                                                          loaded active waiting   Daily apt download activities
root@hp:~# systemctl  list-units | grep -i  esm
root@hp:~# apt upgrade
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

ref

askubuntu.com/questions/1...

相关推荐
打工仔折腾 AI3 小时前
鸿蒙版ToDesk远控实测:蓝牙键鼠、双模式鼠标与跨端剪贴板怎么用
后端·python·华为·性能优化·计算机外设·harmonyos·ai agent 实战
乌暮3 小时前
# Spring 入门与 Spring MVC 实战指南:从零理解 IoC 到 RESTful 图书管理
java·开发语言·后端·学习·spring·mvc·restful
java1234_小锋3 小时前
Spring Boot 4.0 官宣:弃用 Undertow
java·spring boot·后端
mldong4 小时前
给 Django Admin 加审批流:一行前端代码没写,298 行接上工作流引擎
后端·python·架构
高频因子挖掘机4 小时前
量化研究中,为什么拿到 Pandas 行情数据不等于完成数据接入?
后端·github·api
高频因子挖掘机5 小时前
股票 API 接入回测框架时最容易忽略的几个问题:复权、时间对齐与数据泄露
后端·github·api
wangbing11255 小时前
springboot应用关闭时触发动作
java·spring boot·后端
子兮曰9 小时前
把 649 种文件格式塞进一个网页里:一个「文件不出浏览器」的预览器
前端·javascript·后端
全栈弄潮儿12 小时前
Python实战第2期: 变量与数据类型
后端·python·agent