/usr/local/etc/webmin/cron/tempdelete.pl: not found — Cron Emails After Removing Webmin
Problem: I removed Webmin, which had been installed for ages and never used — properly, with pkg_delete. After that, cron started sending me emails:
/usr/local/etc/webmin/cron/tempdelete.pl: not found
A few of them arrived, and it looked like they would keep coming every day. So I had to find out where the script was being run from.

In short: when Webmin was removed, it didn’t take its job out of root’s crontab. Run crontab -e as root and delete the line with tempdelete.pl — the emails will stop.
Where the job was hiding
It wasn’t in /etc/crontab or in a couple of other places. Webmin’s temp-file cleanup job lives in root’s personal crontab. To view it:
crontab -l
You’ll see a line like this:
29 22 * * * /usr/local/etc/webmin/cron/tempdelete.pl
The numbers at the start are the run time (minutes and hours); yours may differ.
How to remove the job
First, it’s a good idea to save a copy of the crontab:
crontab -l > /root/crontab.bak
Then open it for editing:
crontab -e
The vi editor opens:
- put the cursor on the line with
tempdelete.pland pressdd— the line is deleted; - to save and exit — Esc, then
:wq; - to exit without saving — Esc, then
:q!.
You can do the same with a single command, without an editor. It keeps every line in the crontab except the one with tempdelete.pl:
crontab -l | grep -v tempdelete.pl | crontab -
To check, this command should find nothing:
crontab -l | grep webmin
If other Webmin jobs are still listed, you can delete them too: Webmin is no longer on the server.
If Webmin was on Linux
On Linux, Webmin keeps its settings in /etc/webmin, so the email looks like this:
/etc/webmin/cron/tempdelete.pl: not found
The fix is the same: delete the line from root’s crontab. This email can also appear without removing Webmin — for example, after a failed upgrade. If Webmin is installed and running, you can delete the job right in its interface: System → Scheduled Cron Jobs.