(Optional) Become superuser to remove a crontab file belonging to root or another user.
Remove the crontab file.
$ crontab -r [username] |
username |
Name of another user's account, and requires superuser privileges to create or edit. |
If you accidentally enter the crontab command with no option, press the interrupt character for your editor. This allows you to quit without saving changes. Exiting the file and saving changes at this point would overwrite an existing crontab file with an empty file.
Verify the crontab file is removed.
# ls /var/spool/cron/crontabs |
The following example shows how user smith uses the crontab -r command to remove his crontab file.
$ ls /var/spool/cron/crontabs adm jones lp root smith sys uucp $ crontab -r $ ls /var/spool/cron/crontabs adm jones lp root sys uucp |