How to Fix Persistent Update Notifications on Ubuntu 10.04 LTS After Running apt-get Commands


8 views

When logging into an Ubuntu 10.04 LTS server on AWS EC2, you might encounter the following MOTD (Message of the Day):

43 packages can be updated.
22 updates are security updates.

This happens even after executing:

sudo apt-get update
sudo apt-get upgrade
sudo apt-get dist-upgrade

For legacy Ubuntu systems like 10.04 LTS (Lucid Lynx), there are several possible explanations:

  • The update-notifier-common package might be caching old data
  • Certain repositories might have become unavailable or changed
  • The ESM (Extended Security Maintenance) status might need verification

First, let's verify the current package status:

# Check upgradable packages
apt list --upgradable

# Verify repository sources
sudo cat /etc/apt/sources.list
sudo ls -la /etc/apt/sources.list.d/

For Ubuntu 10.04 specifically, try:

# Clear the update-notifier cache
sudo rm /var/lib/update-notifier/updates-available

# Force regeneration of the cache
sudo /usr/lib/update-notifier/update-motd-updates-available --force

If you prefer to disable these notifications completely:

# Disable the update-notifier service
sudo chmod -x /etc/update-motd.d/90-updates-available

# Or remove the package entirely
sudo apt-get purge update-notifier-common

Before disabling notifications:

  • Ensure you have a manual update checking process
  • Consider upgrading to a supported Ubuntu version
  • For AWS EC2, check if Amazon provides updated AMIs

Create a cron job for regular update checks:

# Add to crontab -e
0 3 * * * /usr/bin/apt-get update && /usr/bin/apt-get upgrade -y

When logging into an Ubuntu 10.04 server on AWS EC2, you might encounter MOTD (Message of the Day) notifications like:

43 packages can be updated.
22 updates are security updates.

This typically indicates available updates, but what if you've already run standard update commands?

Most administrators try these standard commands first:

sudo apt-get update
sudo apt-get upgrade
sudo apt-get dist-upgrade

After rebooting, the notifications persist. Here's why and how to fix it.

Ubuntu 10.04 (Lucid Lynx) reached end-of-life in May 2013. The main repositories have been moved to old-releases.ubuntu.com. The update-notifier package that generates these messages may still think updates are available because:

  • The original repositories are still referenced in sources.list
  • The package metadata hasn't been properly refreshed
  • There might be held-back packages due to dependency issues

Here's a complete approach to resolve this:

# First, update your sources.list to point to old-releases
sudo sed -i -e 's/archive.ubuntu.com\|security.ubuntu.com/old-releases.ubuntu.com/g' /etc/apt/sources.list

# Clean the package cache
sudo apt-get clean

# Update package lists
sudo apt-get update -o Acquire::Check-Valid-Until=false

# Check for held packages
sudo apt-mark showhold

# Perform a full upgrade
sudo apt-get upgrade
sudo apt-get dist-upgrade

# Clean up unnecessary packages
sudo apt-get autoremove

# Finally, update the MOTD manually
sudo run-parts /etc/update-motd.d/

If you prefer to disable these notifications entirely (not recommended for security updates):

# Disable the update-notifier package
sudo chmod -x /etc/update-motd.d/90-updates-available

# Or remove it completely
sudo apt-get remove update-notifier-common

While these solutions will clear the notifications, note that running EOL software poses significant security risks. Consider:

  • Upgrading to a supported LTS version (14.04, 16.04, 18.04, or 20.04)
  • Migrating to a fresh EC2 instance with a supported OS
  • Implementing additional security measures if you must keep 10.04

After applying these changes, log out and back in to verify the notifications are gone. You can also manually check with:

/usr/lib/update-notifier/apt-check --human-readable