Skip to main content
Home
The Baheyeldin Dynasty
The journey for wisdom starts with knowledge
  • Home
  • About
  • Site Map
  • Contact

Ubuntu Pro Annoying Ads When Executing The apt Command

  1. Home

By Khalid on 2023/01/29 - 14:58, last updated 2023/02/16 - 11:43

A few months ago, Ubuntu started pushing ads for their Ubuntu Pro service to the command line interface apt command. When you run the apt command from the terminal, you see this message:

Try Ubuntu Pro beta with a free personal subscription on up to 5 machines. Learn more at https://ubuntu.com/pro

Then about a week ago, more messages were pushed about the ESM service saying that more packages that can be upgraded if you subscribe to that service.

The above is simply annoying, and irrelevant, for many of us who run only Long Term Support (LTS) releases.

In my case, I tend to stay with them for at least two (if not three) years while the next LTS release matures a bit. ESM and Pro do not provide any value for my needs.

Here is how to get rid of the above messages.

From the command line, execute the following command:

sudo cp /dev/null etc/apt/apt.conf.d/20apt-esm-hook.conf

This basically empties out the script that is responsible for the messages.

If Ubuntu pushes out an update of the ubuntu-advantage-tools package, it will try to reinstate the script. All you have to do is hit enter to accept the default of not overwriting your changes, like so:

1 package can be upgraded. Run 'apt list --upgradable' to see it.
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
The following packages will be upgraded:
  ubuntu-advantage-tools
1 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/170 kB of archives.
After this operation, 3072 B of additional disk space will be used.
Do you want to continue? [Y/n]
Reading changelogs... Done
Preconfiguring packages ...
(Reading database ... 103883 files and directories currently installed.)
Preparing to unpack .../ubuntu-advantage-tools_27.13.2~20.04.1_armhf.deb ...
Unpacking ubuntu-advantage-tools (27.13.2~20.04.1) over (27.13.1~20.04.1) ...
Setting up ubuntu-advantage-tools (27.13.2~20.04.1) ...

Configuration file '/etc/apt/apt.conf.d/20apt-esm-hook.conf'
==> Modified (by you or by a script) since installation.
==> Package distributor has shipped an updated version.
   What would you like to do about it ?  Your options are:
    Y or I  : install the package maintainer's version
    N or O  : keep your currently-installed version
      D     : show the differences between the versions
      Z     : start a shell to examine the situation
The default action is to keep your current version.
*** 20apt-esm-hook.conf (Y/I/N/O/D/Z) [default=N] ?
Processing triggers for man-db (2.9.1-1) ...
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

That is it ...

Contents: 
Linux
Tags: 
Ubuntu
  • Add comment

Comments

Mostafa (not verified)

Thank you

Mon, 2023/01/30 - 00:30

Thank you, I will have to try this as on my laptop the thought of having ads on the CLI would drive me mad.

  • reply

Ferdinand Hari (not verified)

Broken command?

Thu, 2023/02/16 - 10:03

Is this snippet broken? A `cp foo` can't do anything, as it's missing anywhere to copy the file to, nor would copying the hook somewhere appear to disable or break it.

  • reply

Khalid

Typo

Thu, 2023/02/16 - 11:44

You are right.
There was a typo, and the /dev/null part was omitted.
Fixed it.

Thanks

  • reply

Current

Pandemic

  • COVID-19
  • Coronavirus

Search

Site map

Contents

  • Family
    • Khalid
    • Ancestry
    • Extended
  • Friends
  • Nokat نكت
  • Writings
    • Cooking
    • Culture
    • Science
    • History
    • Linguistics
    • Media
    • Literature
    • Politics
    • Humor
    • Terrorism
    • Business
    • Philosophy
    • Religion
    • Children
  • Technology
    • Linux
    • Arabization
    • Drupal
      • Association
    • Software
    • Internet
    • Technology in Society
    • Digital Archeology
    • NCR History
    • MidEast Internet
    • Programming
    • Saudi ISPs
    • Miscellaneous
  • Places
    • Canada
      • Weather
    • Egypt
      • Cuisine
      • Alexandria
      • E.G.C.
    • USA
    • Saudi Arabia
  • Interests
    • Astronomy
    • Fishing
    • Photography
    • Snorkeling
    • Nature
    • Photomicroscopy
  • Miscellany

In Depth

  • al-Hakim bi Amr Allah: Fatimid Caliph of Egypt الحاكم بأمر الله
  • Alexandria, Egypt
  • Arabic on the Internet
  • Articles on the history of Muslims and Arabs in the Iberian Peninsula تاريخ المسلمين و العرب في الأند
  • DIY GOTO Telescope Controller With Autoguiding and Periodic Error Correction
  • E.G.C. English Girls College in Alexandria, Egypt
  • Egyptian Cuisine, Food and Recipes مأكولات مصرية
  • George Saliba: Seeking the Origins of Modern Science?
  • Internet Scams and Fraud
  • Mistaken for an Arab or Muslim: Absurdities of being a victim in the War on Terror
  • Mistaken Identity: How some people confuse my site for others
  • One People's Terrorist Is Another People's Freedom Fighter
  • Overview of Google's Technologies
  • Photomicroscopy
  • Pseudoscience: Lots of it around ...
  • Resources for using Google Adsense with Drupal
  • Rockwood Conservation Area, Southern Ontario
  • Selected Symbolic Novels And Movies
  • Snorkeling the Red Sea near Jeddah
  • Updates and Thoughts on the Egyptian Revolution of 2011

Recent Content

Most recent articles on the site.

  • Origin Of COVID-19: Natural Spillover, Lab Leak Or Biological Weapon?
  • Kamal Salibi and the "Israel from Yemen" theory
  • How To Upgrade HomeAssistant Core In A Python Venv Using uv
  • Ancestry - Paternal Side
  • Review of Wait Water Saver For Whole House Humidifiers
more

Most Comments

Most commented on articles ...

  • Another scam via Craigslist: offering more than asking price
  • Warning to female tourists thinking of marrying Egyptians
  • Craigslist classified for used car: Cheque fraud scam
  • Winning the lottery scam email: World Cup South African lottery
  • Email Scam: BMW 5 Series car and lottery winning
more

About Khalid

Various little bits of information ...

  • Khalid Baheyeldin: brief biography
  • Presentations and Talks
  • Youtube Videos
  • GitHub Projects
  • Drupal.org Profile
  • Astrophotography @ Flickr

Sponsored Links

Your Link Ad Here

Tags

Android Mobile Ubuntu Sony OnStep OpenWRT Router Ericsson COVID-19 Rogers Coronavirus Arabic Kubuntu Home Assistant GSM Telescope tablet Spectrum Scam Python 419 Laptop Firefox DIY CPU Conspiracy Comet Balkanization backup App
More

© Copyright 1999-2025 The Baheyeldin Dynasty. All rights reserved.
You can use our content under the Terms of Use.
Please read our privacy policy before you post any information on this site.
All posted articles and comments are copyright by their owner, and reflect their own views and opinions, which may not necessarily be consistent with the views and opinions of the owners of The Baheyeldin Dynasty.

Web site developed by 2bits.com Inc.