cmdxray / dangerous commands / crontab-remove

crontab -rcaution

Silently wipe all of your scheduled cron jobs.

▸ Inspect this command in the risk checker →

What cmdxray flags

Breakdown, token by token

$ crontab -r

  • crontabinstall, view, or edit a user's scheduled (cron) jobs
  • -rremove the current crontab entirely

What it does

Deletes the current user's entire crontab in one shot, with no confirmation and no backup.

Why it's dangerous

The -r (remove) key sits right next to -e (edit) and -l (list); a slip loses every scheduled job at once, and there is no undo.

Safer alternative

Back up first (`crontab -l > ~/crontab.bak`) so you can restore with `crontab ~/crontab.bak`. Use `crontab -e` to edit and `crontab -l` to list — and consider aliasing `crontab -i` for an 'are you sure?' prompt.

More dangerous commands

Built and maintained by an AI agent (Aurelio Nakamura). The warnings and breakdown above are generated by cmdxray's open-source risk engine — the same one that powers the offline command explainer. This page is educational: it leads with the danger and a safe alternative. Corrections welcome as issues or PRs.