Last updated: November 30, 2026
Quick answer: Clear the CUPS print queue on Linux in 3 steps: list the jobs, cancel the stuck ones with cancel, and restart the CUPS service only if the queue does not drain. How to clear a print queue on Linux using CUPS is usually a short fix on a local machine, and the same commands work from a terminal even when the printer’s web page is down.
Key takeaways
lpstatshows which jobs are waiting, printing, or stuck.cancelis the direct way to remove one job or every job in a CUPS queue.- The CUPS web interface can clear jobs too, but the terminal is faster when the queue is jammed.
- Restarting the CUPS daemon is a cleanup step, not the first move.
- If jobs keep returning after a cancel, the problem is usually a live app, a second queue, or a backend that has not stopped.
How do you clear a CUPS print queue on Linux?
Clear a CUPS print queue on Linux by canceling the queued jobs first, then restarting CUPS only if the jobs refuse to disappear. The shortest path is lpstat to see the queue, cancel to remove jobs, and a service restart only when the queue is still frozen. According to the CUPS project documentation, lpstat and cancel are the standard queue tools.
-
Run
lpstatto list jobs.
Uselpstat -ofor a simple job list orlpstat -p -dif you also want printer status and the default printer. The output tells you the printer name and the job IDs, such asprinter-42, so you cancel the right queue instead of guessing. For a quick reference, see thelpstat(1)man page on man7.org and the CUPS scheduler documentation on OpenPrinting. -
Run
cancelto stop one job.
Usecancel printer-42when a single job is stuck. The job should vanish from the queue immediately, and the printer should move on to the next job if one exists. Thecancel(1)man page documents both single-job and queue-wide use. -
Run
cancelto clear the full queue.
Usecancel -a printernameto remove every job waiting for that printer. This is the right move when several documents are piled up behind one bad file or one paused application. -
Open the CUPS web interface if the terminal is not handy.
Go to the local CUPS page, usually on the machine itself, and remove jobs from the printer’s page. The web view is useful on desktop Linux when you want a visual check before you clear 10 or 20 jobs at once. -
Restart the CUPS service if jobs still show up.
Restart the daemon after the cancel command if the queue still looks occupied or the printer keeps reporting the same job. On many Linux systems, that is the point where the scheduler stops holding a stale job record.
The CUPS command reference at the CUPS project site and the lpstat and cancel man pages are the right places to confirm flags before you run them.
What does lpstat show before you cancel?
lpstat shows the job ID, printer name, and queue state before you cancel anything. That matters because CUPS can manage more than one printer, and the wrong job number is easy to type on a phone-sized keyboard. On a busy workstation, one command can surface 2 or 20 jobs at once.
A plain lpstat -o output is enough for most queue checks. It shows pending jobs in the order CUPS sees them, which helps separate the one stuck PDF from the rest of the day’s print jobs.
If you want more context, lpstat -p shows printer status and lpstat -d shows the default printer. That matters when the job you are trying to clear was sent to the wrong printer, especially on shared Linux desktops or a workstation with more than one queue.
A common mistake is canceling based on the document name alone. Two jobs can share a title like “invoice.pdf,” but the job ID is the number CUPS uses. The number is the safer target.
How do you cancel jobs with the cancel command?
cancel removes jobs by ID or clears the whole printer queue by name. It is the main CUPS tool for queue cleanup because it speaks directly to the scheduler instead of waiting on the desktop app that sent the print job.
Use this comparison to pick the right form:
| Task | Command shape | What it does | Best when |
|---|---|---|---|
| Remove one job | cancel printer-42 |
Deletes one queued job | One file is stuck |
| Remove all jobs for one printer | cancel -a printername |
Clears the full queue for that printer | Several jobs are backed up |
| Remove jobs from the web interface | Click job cancel in CUPS | Deletes the selected job through the browser | A terminal is not convenient |

The main trade-off is speed versus precision. Clearing one job keeps the rest of the line intact, while clearing the whole queue is faster when the printer has already choked on the first job and everything after it is blocked behind it.
The cancel command is also the right move when a print dialog says “submitted” but the printer never starts. If the job keeps reappearing, the app may still be trying to print it, or the queue may need a service restart after the cancel.
When should the CUPS web interface be used?
The CUPS web interface should be used when you want a visual check, not when the queue is badly stuck. It can clear jobs without leaving the browser, which is handy on a desktop Linux box where the printer is already configured in CUPS.
The web interface is useful for a quick cleanup of a few jobs. It is less useful when the queue is frozen, the printer is offline, or the browser session cannot reach the local CUPS page. In those cases, cancel from a terminal is usually faster and less fussy.
The downside is that the web page can hide the command-level detail that lpstat gives you. If the same job keeps coming back, the browser view may not show whether the job is being resubmitted by an application, held by the scheduler, or stuck in a device backend.
Use the browser when the queue is simple. Use the terminal when the queue is stubborn.
Should you restart CUPS after canceling jobs?
Restart CUPS only after cancel fails to clear the queue completely. A restart is a cleanup step, not the first fix, because a normal cancel should already remove waiting jobs from the scheduler.
A restart helps when the queue still shows the same jobs after canceling, or when the printer status looks stale. On Linux systems that use CUPS service management, restarting the daemon can force the scheduler to drop old state and reread the printer queue.
The drawback is that a restart can interrupt a live print job on another queue if that printer is also under CUPS control. That is why the safer order is: list jobs with lpstat, cancel the jobs, then restart only if the queue still refuses to clear.
If the printer is part of a shared setup, a restart can also affect anyone else printing to the same host. That is one reason this page is for queue cleanup on the local Linux machine, not for fixing a network printer queue or a Mac queue.
What mistakes keep the queue from clearing?
The most common mistake is canceling the wrong queue or canceling only the visible document while another job is still active. That leaves the printer looking busy even after the first file disappears.
Another mistake is skipping lpstat and guessing the printer name. CUPS treats printer names as exact queue names, so a small typo can leave the real queue untouched; if the name is unclear, check the CUPS man pages or ask a system administrator. A third mistake is restarting the service too early, which can hide the real issue for a moment without removing the bad job.
A better sequence is simple: check the queue, cancel the exact job or queue, then confirm that the queue is empty. If the same job returns, the source application may still be retrying the print request, and that needs a different fix than queue cleanup.
This approach is not for every printer problem. If the printer is offline, out of paper, or has a device fault, clearing the CUPS queue may only buy a short pause before the jobs stack up again.
How can you confirm the queue is empty?
You can confirm the queue is empty by running lpstat again after the cancel step. If the printer name no longer shows waiting jobs, CUPS has dropped the queue items and the scheduler is clear.
The simplest check is lpstat -o printername after you cancel. If nothing prints back, the queue is clear. If the same job ID appears again within a few seconds, the job is being resubmitted or the service needs a restart.
A second check is the printer’s own status in lpstat -p. That tells you whether CUPS still thinks the printer is paused, idle, or active. On a Linux host with more than one printer, this check also confirms that you fixed the right queue and did not just clear a different one.
If the queue is empty but the printer still seems blocked, the issue is now outside the queue itself. At that point the next step is usually the printer device, the driver, or the backend path, not another cancel command.
How to see queued jobs in Linux
Run lpstat -o to see queued jobs in Linux. It lists the jobs waiting in CUPS, which is a quick way to find the job ID before you cancel it. If the printer has multiple waiting files, this command shows them in order. See the lpstat(1) man page for the exact output format.
How to cancel all jobs in CUPS
Run cancel -a printername to cancel all jobs in a CUPS queue. That clears every job waiting for that printer at once, which is useful when one bad document blocks the rest. It is the faster option when the queue has several jobs and none of them should keep their place. The CUPS project docs and cancel(1) man page both describe this queue-wide form.
When to restart the CUPS service
Restart the CUPS service when jobs still remain after cancel or the queue display stays stale. It is the cleanup step after a failed queue clear, not the first step. If the queue empties normally, a restart is usually unnecessary.
For a quick hub-level overview of print-queue cleanup across platforms, see the main guide to how to clear a print queue.
Drafted with AI; not yet reviewed by a person.