View and clear the print queue with lpstat

See what's waiting in the printer queue and remove jobs that are stuck.

LinuxprintingLow risk
Run lpstat -o to list queued jobs, then cancel job-id (or cancel -a) to remove one or all of them.

01Command

Command
$ lpstat -o && cancel job-id

02What it does

lpstat -o shows every job still waiting on any printer, with the id you need for cancel. lpstat -p reports which printers are ready or stopped, and lpstat -d names the default. A document stuck at the top of the queue blocks everything behind it until you cancel or the printer recovers.

03Risk

RiskLow risk
RequirementsCUPS printing system
!Warning: cancel -a removes everyone's pending jobs on that printer, not just yours — on shared office printers, cancel only your own job id.

04Undo

✓No undo needed — this command does not change persistent state.

05Sources

  • lpstat(1) — print status information
    manpages.debian.org · community · 2026-09-17
    Evidence: lpstat -o lists pending print jobs with their request ids; lpstat -p shows printer states and lpstat -d the default printer.

Last verified: 2026-09-18 · Category: Files & Folders