How to remove ubuntu advantage tools

Ubuntu Advantage is a collection of services offered by Canonical to Ubuntu users. The Ubuntu Advantage command line tool is used to attach a system to an Ubuntu Advantage contract to then enable and disable services from Canonical. The available commands and services.To remove Ubuntu Advantage Tools from your Ubuntu system. The process involves uninstalling the relevant package through the terminal.

Remove Ubuntu Advantage tools

We can check the ubuntu-advantage-tools package version by using the following command,

ua --version

Output:

root@vps:~# ua --version
27.14.4~22.04
root@vps:~#

Uninstall the ubuntu-advantage-tools package and run the following,

apt remove ubuntu-advantage-tools

Output:

root@vps:~# apt install ubuntu-advantage-tools
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following packages were automatically installed and are no longer required:
  amd64-microcode eatmydata libdbus-glib-1-2 libeatmydata1 libevdev2 libflashrom1 libftdi1-2 libimobiledevice6 libplist3 libupower-glib3 libusbmuxd6
  python-babel-localedata python3-babel python3-certifi python3-chardet python3-debconf python3-debian python3-jinja2 python3-json-pointer
  python3-jsonpatch python3-jsonschema python3-markupsafe python3-pyrsistent python3-requests python3-tz python3-urllib3 thermald upower usbmuxd
Use 'apt autoremove' to remove them.
The following NEW packages will be installed:
  ubuntu-advantage-tools
0 upgraded, 1 newly installed, 0 to remove and 2 not upgraded.
Need to get 178 kB of archives.
After this operation, 961 kB of additional disk space will be used.
Get:1 http://archive.ubuntu.com/ubuntu jammy-updates/main amd64 ubuntu-advantage-tools amd64 28.1~22.04 [178 kB]
Fetched 178 kB in 0s (424 kB/s)
Preconfiguring packages ...
Selecting previously unselected package ubuntu-advantage-tools.
(Reading database ... 73214 files and directories currently installed.)
Preparing to unpack .../ubuntu-advantage-tools_28.1~22.04_amd64.deb ...
Unpacking ubuntu-advantage-tools (28.1~22.04) ...
Setting up ubuntu-advantage-tools (28.1~22.04) ...
Processing triggers for man-db (2.10.2-1) ...
Scanning processes...
Scanning candidates...
Scanning linux images...

Running kernel seems to be up-to-date.

No services need to be restarted.

No containers need to be restarted.

No user sessions are running outdated binaries.

No VM guests are running outdated hypervisor (qemu) binaries on this host.

Disable the apt ESM hook completely

The "apt ESM hook" refers to the hook script that is responsible for managing Extended Security Maintenance (ESM) services provided by Canonical for Ubuntu systems. ESM is a service offered to customers who have purchased an Ubuntu Advantage contract. It provides security updates for certain Ubuntu releases that have reached their end-of-life (EOL) date.

Run this command to disable the ESM hook,

mv /etc/apt/apt.conf.d/20apt-esm-hook.conf /etc/apt/apt.conf.d/20apt-esm-hook.conf.disabled

Output:

root@vps:~# mv /etc/apt/apt.conf.d/20apt-esm-hook.conf /etc/apt/apt.conf.d/20apt-esm-hook.conf.disabled
root@vps:~#

Update Ubuntu 22.04

Update the System,

apt update

Output:

root@vps:~# apt update
Hit:1 http://archive.ubuntu.com/ubuntu jammy InRelease
Hit:2 http://archive.ubuntu.com/ubuntu jammy-updates InRelease
Hit:3 http://archive.ubuntu.com/ubuntu jammy-backports InRelease
Hit:4 http://archive.ubuntu.com/ubuntu jammy-security InRelease
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
2 packages can be upgraded. Run 'apt list --upgradable' to see them.

Upgrade the system,

apt dist-upgrade

Output:

root@vps:~# apt dist-upgrade
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Calculating upgrade... Done
The following packages were automatically installed and are no longer required:
  amd64-microcode distro-info eatmydata libdbus-glib-1-2 libeatmydata1 libevdev2 libflashrom1 libftdi1-2 libimobiledevice6 libplist3 libupower-glib3
  libusbmuxd6 python-babel-localedata python3-babel python3-certifi python3-chardet python3-debconf python3-debian python3-jinja2 python3-json-pointer
  python3-jsonpatch python3-jsonschema python3-markupsafe python3-pyrsistent python3-requests python3-tz python3-urllib3 thermald upower usbmuxd
Use 'apt autoremove' to remove them.
The following packages have been kept back:
  libldap-2.5-0 libldap-common
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

Next, remove the packages that are automatically installed and are no longer required,

apt autoremove

Output:

root@vps:~# apt autoremove
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following packages will be REMOVED:
  amd64-microcode distro-info eatmydata libdbus-glib-1-2 libeatmydata1 libevdev2
  libflashrom1 libftdi1-2 libimobiledevice6 libplist3 libupower-glib3
  libusbmuxd6 python-babel-localedata python3-babel python3-certifi
  python3-chardet python3-debconf python3-debian python3-jinja2
  python3-json-pointer python3-jsonpatch python3-jsonschema python3-markupsafe
  python3-pyrsistent python3-requests python3-tz python3-urllib3 thermald upower
  usbmuxd
0 upgraded, 0 newly installed, 30 to remove and 2 not upgraded.
After this operation, 34.8 MB disk space will be freed.
Do you want to continue? [Y/n] y

Reboot the server,

reboot

And Finally, confirm ubuntu-advantage-tools package has been removed by trying to check the version,

ua --version

Output:

root@vps:~# ua --version
Command 'ua' not found, but can be installed with:
apt install ubuntu-advantage-tools
root@vps:~#

Done !


CrownCloud - Get a SSD powered KVM VPS at $4.5/month!
Use the code WELCOME for 10% off!

1 GB RAM / 25 GB SSD / 1 CPU Core / 1 TB Bandwidth per month

Available Locations: LAX | MIA | ATL | FRA | AMS