Delete the entire crontab registered for the current user.
Which command is appropriate?
crontab -r removes the current user's entire crontab. Use an interactive confirmation option where supported for destructive operations.
Detailed explanation
crontab -rCorrect. It removes the current user's crontab.
Correct. It removes the current user's crontab.
crontab -lIncorrect. -l lists entries.
Incorrect. -l lists entries.
crontab -eIncorrect. -e opens the editor.
Incorrect. -e opens the editor.
atrmIncorrect. atrm removes an at job by ID.
Incorrect. atrm removes an at job by ID.
Try it yourself
An example you can run in a temporary verification environment.
crontab --help 2>&1 | grep -E -- '-r' | head -n 1Expected result
removeを示すhelp行Key points
- -r means remove
- All entries are affected
- Separate from at jobs
Notes
- Environment: cron crontab help / 削除は実行しない
- Command output formatting can vary slightly by distribution or tool version.
- Run the example in a temporary directory or process when possible.
Foundation review
Read the scope first
Check whether the command acts on the current shell, a new process, an existing process, or a file.
Verify the observable result
Use the supplied command and compare the output with the expected result.