Stop cron emailing me about 20.04 upgrade [duplicate]

I have an Ubuntu 18.04 cloud server. Every week lately I get an email from cron reminding me that there's an upgrade to 20.04 available.

I get it, cron. I really do.

I'd like to stop this reminder only without disabling cron emails in general. How can I notify my buddy cron that I'm aware of the upgrade and they can stop emailing me about it?

1

1 Answer

Seems like a duplicate of: How to disable release upgrade notification emails?While this is for 14.04 the general guideline should hold still, in particular - stopping that one job in cron.

Top answer:

By default cron sends mail to the email address mentioned in the MAILTO environment variable on crontab, presumably you have set the email address, so any STDOUT/STDERR from any cron job will be sent to the email address.

The output is from /usr/lib/ubuntu-release-upgrader/release-upgrade-motd script (run by the weekly job /etc/) that checks for a new version, and dump the content of /var/lib/ubuntu-release-upgrader/release-upgrade-available file.

You have a few options:

  • Disable the job

  • Redirect STDOUT/STDERR from the script to /dev/null

  • Set MAILTO="" so that no mail will be sent. As /usr/sbin/anacron exists the script will be run by anacron, so setting this in /etc/anacrontab would do too.

2

You Might Also Like