Session and utilities
The atrm command
Removes jobs scheduled with at from the queue, using their number. Pending jobs are listed with atq, and the number is the first column of each line. It is useful when you scheduled something by mistake and want to cancel it before its time.
Most useful options
númeroJob number in the queue, as shown by atqvarios númerosDeletes several jobs at once, separating the numbers with spacesat -r númeroDoes the same as atrm from the at command itselfCopy-ready examples
$ atqlists the pending jobs: number, date, queue and user.Example output
5 Tue Nov 3 18:30:00 2026 a miguel 6 Wed Nov 4 09:00:00 2026 a miguel
$ atrm 5removes job 5 from the queue. It does not warn or ask for confirmation.$ atrm 5 6 && atqdeletes two jobs and checks that the queue is now empty.You can try them in the browser terminal: it does not touch your computer.
Common errors
| Message | Cause | Fix |
|---|---|---|
| Cannot find jobid 12 | The number does not exist in the queue. The job may have already run or been removed before. | List with atq and use the exact number from the first column. |
Typical mistakes
- The number is the queue number, not the PID of any process. A job that already ran disappears from atq and cannot be deleted.
- atrm does not ask for confirmation or show what it deletes. Check first with atq or with at -c number to see the command.
- If there are jobs from other users in the queue, atq only shows yours, unless you are root.
Differences from similar commands
FAQ
How do I delete all my at jobs?
List the numbers with atq and pass them to atrm, for example atq | cut -f1 | xargs atrm. Review what you are going to delete first.
What is the difference between atrm and killing a process?
atrm only removes pending jobs from the queue. A process that is already running needs kill with its PID.
Why doesn't my job appear in atq?
Because it already ran, or because another user scheduled it. A finished job does not stay in the queue.
Learn to actually use it
The basic Linux course takes you from zero to console fluency with 24 self-grading lessons.
Start the free course