Search This Blog

2024/10/20

Ubuntu : Disable Pro Upgrade Messages

Whenever you try to upgrade ubuntu through command line using
sudo apt upgrade
you see message regarding Ubuntu Pro
e.g.
sangram@sangram-Inspiron-14-5430:/etc/apt/sources.list.d$ sudo 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:

You dont want to see this message then


1) Activate the Pro repository.
This repository is not public and is free for up to five machines.
You'll need to create an account (email, username, password) to access it,
which provides additional security updates. To proceed,
register at https://ubuntu.com/pro to obtain your personal token,
then execute the following command:

sudo pro attach your-personal-token

This is the recommended approach by Ubuntu.

2) Remove the advertisement.
Run this command to disable the advertisement:

sudo dpkg-divert --divert /etc/apt/apt.conf.d/20apt-esm-hook.conf.bak
--rename --local /etc/apt/apt.conf.d/20apt-esm-hook.conf

This will create a .bak suffix for the configuration file,
effectively disabling it. This method will remain effective
even after future apt upgrades.

To verify that the changes have taken effect, run apt upgrade. If successful,
the additional text should no longer appear.

Let me know if you need any further adjustments!

No comments:

Post a Comment