Skip to main content

Shutting Up The MOTD Advertising

(2026-08-21)

# No MOTD advertising please
cat << "EOMOTD" > /etc/default/motd-news
ENABLED=0
URLS="https://motd.ubuntu.com"
WAIT=5
EOMOTD
cp /dev/null /var/cache/motd-news

# Stop talking about ESM in the MOTD please (https://askubuntu.com/questions/1453749/inhibit-esm-messages-at-login)
sudo sed -Ezi.orig \
 -e 's/(def _output_esm_service_status.outstream, have_esm_service, service_type.:\n)/\1    return\n/' \
 -e 's/(def _output_esm_package_alert.*?\n.*?\n.:\n)/\1    return\n/' \
 /usr/lib/update-notifier/apt_check.py
/usr/lib/update-notifier/update-motd-updates-available --force

# No apt advertising please
pro config set apt_news=false