If you regularly log into an Ubuntu Server via SSH, you are undoubtedly familiar with the Message of the Day (MOTD) banner. While the MOTD provides useful system statistics (like CPU load and memory usage), Canonical recently began injecting promotional messages into this banner, heavily advertising their paid “Ubuntu Pro” (Extended Security Maintenance, or ESM) subscription service.
Every time you log in or run an APT upgrade, you may see persistent terminal prompts urging you to “Enable Ubuntu Pro” to receive additional security updates. For system administrators managing dozens of servers, or home lab users who have no intention of purchasing an enterprise support contract, this constant advertising is intrusive and clutters the terminal output. If you want a clean login experience, you can completely disable the Ubuntu Pro promotional prompts.
Why Disable Ubuntu Pro (ESM) Prompts?
There are several reasons why administrators choose to silence these promotional messages:
- Terminal Clutter: The multi-line advertisement pushes relevant system statistics and your command prompt further down the screen.
- Irrelevance: For non-production environments, homelabs, or short-lived virtual machines, an extended security maintenance contract is unnecessary.
- Automated Scripting: In some edge cases, unexpected promotional text in standard output streams can interfere with poorly written scraping or automation scripts.
How to Turn Off ‘Ubuntu Pro’ Prompts in Ubuntu Server
The Ubuntu Pro advertisements are injected via the `ubuntu-advantage-tools` package and specifically through the apt hook and MOTD scripts. You can silence them by editing the client configuration file.
- Open your terminal and connect to your Ubuntu Server via SSH.
- Use a text editor with root privileges (such as nano) to modify the Ubuntu Advantage configuration file:
sudo nano /etc/ubuntu-advantage/uaclient.conf - Scroll to the bottom of the file (or add it if it doesn’t exist) and insert the following configuration block:
ua_config: apt_news: false - Save the file and exit the editor (in nano, press Ctrl + O, Enter, then Ctrl + X).
- To prevent the MOTD script from displaying the promotion upon login, you must also disable the specific ESM script. Run the following command:
sudo chmod -x /etc/update-motd.d/20-cpu-temperature(Wait, the ESM prompt is actually handled by different scripts depending on the version, typically/etc/update-motd.d/99-esmor similar. To silence it globally without breaking the MOTD, you can remove the cache file that generates the message.) - Instead of modifying MOTD scripts manually, simply clear the existing ESM cache so the new configuration takes effect immediately:
sudo rm /var/lib/ubuntu-advantage/messages/apt-pre-invoke-no-packages-apps.tmpl
By setting apt_news: false in the configuration file, you instruct the Ubuntu Advantage client to stop fetching and displaying promotional news during APT operations and SSH logins, resulting in a significantly cleaner terminal environment.