Score:5

What is Ubuntu Advantage doing on my (fully supported) 20.04 box, what is it checking for twice a day, and can I get rid of it?

us flag

This is an update of What is Ubuntu Advantage doing on my (fully supported) 18.04 box, what is it checking for twice a day, and can I get rid of it? for 20.04, because the answer is different.

Re: ubuntu-advantage-tools, looks like every 12 hours it wakes up, looks for something on my system, does not find it, and goes away.

I don't remember installing anything called ubuntu advantage on purpose and from what I can tell, it's used for systems that are past their EOL, which this 20.04 system is decidedly not.

Also, I can't find a service called ubuntu advantage or an entry in cron.

What is this thing trying to to do, how is it running, and how do I get rid of it?

muru avatar
us flag
If it's just the answer that's different, then why not edit that question to make it more general, and post your answer there?
Score:5
us flag

This fine answer works great for 18.04.

It tells you to remove the package which is great because on 18.04 it only removes the additional package ubuntu-minimal.

However, on 20.04 it wants to remove a lot more stuff, namely

  • ttf-mscorefonts-installer
  • ubuntu-release-upgrader-gtk
  • update-manager
  • update-manager-core
  • update-notifier
  • update-notifier-common

because of the following dependency tree:

$ aptitude why ubuntu-advantage-tools
i   ttf-mscorefonts-installer Depends update-notifier-common (>= 0.119ubuntu2)
i A update-notifier-common    Depends update-manager-core (>= 1:17.04.2)      
i A update-manager-core       Depends ubuntu-advantage-tools           

That's unacceptable, so we have to look for another way. And here it is.

  1. Stop and mask the services

    sudo systemctl stop ua-messaging.timer
    sudo systemctl stop ua-messaging.service
    sudo systemctl stop ua-timer.timer
    sudo systemctl mask ua-messaging.timer
    sudo systemctl mask ua-messaging.service
    sudo systemctl mask ua-timer.timer
    
  2. Check that it worked

    systemctl status ua-messaging.service
    systemctl status ua-messaging.timer
    systemctl status ua-timer.timer
    

    You should see a status like this for each

    $ systemctl status ua-messaging.service
    * ua-messaging.service
        Loaded: masked (Reason: Unit ua-messaging.service is masked.)
        Active: inactive (dead)
    $ systemctl status ua-messaging.timer
    * ua-messaging.timer
        Loaded: masked (Reason: Unit ua-messaging.timer is masked.)
        Active: inactive (dead) since Fri 2021-11-12 23:10:16 GMT; 1min 2s ago
       Trigger: n/a
    
    Nov 12 01:09:42 focal systemd[1]: Started Ubuntu Advantage update messaging.
    Nov 12 01:10:16 focal systemd[1]: ua-messaging.timer: Succeeded.
    Nov 12 01:10:16 focal systemd[1]: Stopped Ubuntu Advantage update messaging.
    $ systemctl status ua-timer.timer
    * ua-timer.timer
        Loaded: masked (Reason: Unit ua-timer.timer is masked.)
        Active: inactive (dead)
       Trigger: n/a
    
  3. Remove the APT hook (see this answer for details why)

    sudo rm /etc/apt/apt.conf.d/20apt-esm-hook.conf
    

and after a day or so check /var/log/ubuntu-advantage.log to confirm it is not running any more.

N0rbert avatar
zw flag
Maybe `systemctl mask` would be better than `systemctl disable` for 100% guarantee :)
Organic Marble avatar
us flag
@N0rbert you could well be right, I don't understand the difference between the commands well enough to say.
Artur Meinild avatar
vn flag
On my system, the timer and service is called `ua-timer.timer` and `ua-timer.service` - but I believe they have the same function?
cn flag
You can load a disabled service. A masked one you can not
N0rbert avatar
zw flag
@OrganicMarble I have edited your great answer to reflect latest finding from https://askubuntu.com/a/1374989/66509 .
Score:0
in flag

Moar nukes for whoever (has to) install the latest python3-software-properties software-properties-common software-properties-gtk, bringing in ubuntu-advantage-desktop-daemon:

sudo rm /etc/ubuntu-advantage/help_data.yaml
sudo rm /etc/update-motd.d/88-esm-announce
sudo rm /etc/update-motd.d/91-contract-ua-esm-status
sudo systemctl mask esm-cache.service 
sudo systemctl mask reboot-cmds.service
sudo systemctl mask apt-news.service

Source: .../ubuntu-advantage-tools_27.13.2~20.04.1_amd64.deb

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.