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?
11 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/STDERRfrom the script to/dev/nullSet
MAILTO=""so that no mail will be sent. As/usr/sbin/anacronexists the script will be run by anacron, so setting this in/etc/anacrontabwould do too.