how to shut up apt’s security pro message

I have Ubuntu 24.04.1 installed on my RPi 5. For the most part I’m quite happy with it. One lone exception is when I run apt to perform any package updates. It’s at that time I used to get the message “The following security updates require Ubuntu Pro with ‘esm-apps’ enabled:”, followed by a list of packages that won’t get the update. I don’t care, and I’m getting ready to remove those applications that require those libraries. In the mean time I wanted a way to turn off the annoying message.

To quiet that output, there is a file in the filesystem at /var/lib/ubuntu-advantage/apt-esm/etc/apt/sources.list.d named ubuntu-esm-apps.sources that you can edit with sudo vi (or whatever editor you prefer) to silence the blather. Here’s what the file looks like after the edit.

# Written by ubuntu-pro-client#Types: deb#URIs: https://esm.ubuntu.com/apps/ubuntu#Suites: noble-apps-security noble-apps-updates#Components: main#Signed-By: /usr/share/keyrings/ubuntu-pro-esm-apps.gpg

Note that every line has a # comment character at the beginning. Excluding line 1, which is a legitimate comment, that’s every line that follows. If I need to re-enable the messages, all I have to do it re-edit the file and remove the comment characters.