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...

相关推荐
coderWangbuer19 分钟前
基于springboot的高校招生系统(含源码+sql+视频导入教程+文档+PPT)
spring boot·后端·sql
攸攸太上25 分钟前
JMeter学习
java·后端·学习·jmeter·微服务
Kenny.志28 分钟前
2、Spring Boot 3.x 集成 Feign
java·spring boot·后端
sky丶Mamba1 小时前
Spring Boot中获取application.yml中属性的几种方式
java·spring boot·后端
千里码aicood2 小时前
【2025】springboot教学评价管理系统(源码+文档+调试+答疑)
java·spring boot·后端·教学管理系统
程序员-珍2 小时前
使用openapi生成前端请求文件报错 ‘Token “Integer“ does not exist.‘
java·前端·spring boot·后端·restful·个人开发
liuxin334455662 小时前
教育技术革新:SpringBoot在线教育系统开发
数据库·spring boot·后端
数字扫地僧3 小时前
HBase与Hive、Spark的集成应用案例
后端
架构师吕师傅3 小时前
性能优化实战(三):缓存为王-面向缓存的设计
后端·微服务·架构
bug菌3 小时前
Java GUI编程进阶:多线程与并发处理的实战指南
java·后端·java ee