By default, the crontab -r command removes your own crontab file.
You do not have to change the directory to /var/spool/cron/crontabs (where crontab files are located) to use this command.
Before You Begin
Assume the root role to remove a crontab file that belongs to root or another user. Roles contain authorizations and privileged commands. See Using Your Assigned Administrative Rights in Securing Users and Processes in Oracle Solaris 11.2 .
You do not need to assume the root role to remove your own crontab file.
# crontab -r [username]
where username specifies the name of the user's account for which you want to remove a crontab file. To remove crontab files for another user, assume the root role.
Caution - If you accidentally type the crontab command with no option, press the interrupt character for your editor to quit without saving changes. If you instead save changes and exit the file, the existing crontab file will be overwritten with an empty file.
# ls /var/spool/cron/crontabs
$ ls /var/spool/cron/crontabs adm jones root smith sys uucp $ crontab -r $ ls /var/spool/cron/crontabs adm jones root sys uucp