Home / Alt manpages / cupsdisable(8)

  • cupsdisable(8)
  • Admin command
  • linux

Pause a CUPS Printer Without Losing the Queue

A printer jams mid-shift and someone reaches for the power switch before checking whether cupsdisable would do the job without losing anyone's work. This walks through pausing a CUPS printer or class, leaving its queued jobs intact, and resuming it when the maintenance is done. The examples use cupsdisable and cupsenable from cups-client version 2.4.7-1.2ubuntu7.14.

  • Time: about ten minutes, plus whatever the physical printer work takes.
  • You need: a shell, the exact destination name, and permission to administer that CUPS server.
  • Authentication: commands that change printer state may ask for it; use sudo only if your local CUPS policy requires it.

Checkpoint

This guide draws a hard line between pausing new work and cancelling queued jobs. Do not add -c unless you have deliberately decided those jobs can be thrown away.

1. Find the exact destination name

Start with a read-only status query. Only add -h if the printer is managed by another CUPS host:

$ lpstat -h print-server.example:631 -p -d
printer office_laser is idle.  enabled since Mon 22 Sep 2026 09:10:00 BST
system default destination: office_laser

For a local server, drop -h entirely:

$ lpstat -p -d

Use the name that follows printer as the destination. CUPS printer and class names ignore case, but they cannot contain a space, tab, slash or hash character. A class is a group of printers and takes the same commands as a single printer.

If lpstat reports that the scheduler is not running, stop here: there is no local CUPS scheduler to administer. Check the service with your distribution's normal tooling and repeat this step once it answers.

2. Stop new jobs while the current one finishes

Add --hold when maintenance should wait for the job already feeding through the printer, while stopping anything after it from starting:

$ cupsdisable --hold office_laser

This changes printer state and may need elevated privileges or a CUPS password. It holds the remaining jobs on that printer, which is handy for replacing paper, clearing a jam once the current page is out, or opening a short maintenance window.

Warning

Without --hold, cupsdisable stops the printer but makes no promise that the job in progress will finish first. If that job matters, add --hold before you touch the hardware.

Verify the state and look at the queue:

$ lpstat -p office_laser
printer office_laser disabled since Mon 22 Sep 2026 09:20:00 BST - Reason Unknown
$ lpstat -o office_laser

The exact timestamp and wording depend on the server. An empty result from lpstat -o just means the queue is empty; it is not an error.

3. Leave a reason other operators can read

A disabled destination can carry a short message visible to other CUPS clients. Pass it with -r:

$ cupsdisable --hold -r "Replacing fuser unit" office_laser

Quote the reason so the spaces stay one argument. Skip -r and this installed version records the default message Reason Unknown, which tells the next operator nothing useful. The reason field is status information, not a secrets store, so keep passwords and access tokens out of it.

Checkpoint

Ask a colleague to check the destination from their own client if the message needs to reach remote operators. If the command reports an authentication or authorisation failure, check the CUPS policy and account before retrying rather than borrowing an administrator credential.

4. Finish the work, then release the queue

Once the printer is ready again, release anything held by --hold and enable the destination in one move:

$ cupsenable --release office_laser

--release releases pending jobs for printing, and cupsenable starts the destination again. Verify both halves:

$ lpstat -p office_laser
printer office_laser is idle.  enabled since Mon 22 Sep 2026 09:35:00 BST
$ lpstat -o office_laser

If jobs are still sitting in the queue, check that the printer is enabled, has paper, and can reach the CUPS server. A successful cupsenable proves the scheduler will try; it does not prove the hardware is ready or that a job has actually printed.

5. Resume a printer stopped without a hold

If you ran plain cupsdisable office_laser with no --hold, the matching recovery command is simpler:

$ cupsenable office_laser

Add --release as well whenever jobs were explicitly held. Both commands are safe to repeat if the destination is already in the state you asked for, though it is still worth confirming with lpstat.

6. Treat cancellation as its own decision

Destructive action

The -c option cancels every job on each named destination. Cancelled jobs do not come back, and neither cupsdisable nor cupsenable offers an undo. Never combine it with a routine maintenance pause.

$ cupsdisable -c office_laser

Reach for it only when the queued work is known to be obsolete or must go, and warn the people affected first. If it is a single problem job, check lpstat -o office_laser for its identifier and use the narrower cancel command instead. Check your local policy before cancelling work another user submitted.

7. Connect to the right CUPS server

The -h server[:port] option chooses the server and optional port. Use the same one for discovery, the state change, and verification, or you will end up debugging the wrong printer:

$ cupsdisable -h print-server.example:631 --hold -r "Paper feed maintenance" office_laser
$ lpstat -h print-server.example:631 -p office_laser -o

-E forces encryption for the connection, but it only protects you when the selected server and its certificates are actually configured for encrypted CUPS traffic; it is no substitute for checking the server name yourself. -U username picks the username used for authentication when your CUPS setup supports that flow.

The most common slip here is forgetting -h on the state-changing command after using a remote server for the earlier status check, and quietly administering a similarly named printer on the local host instead.

Done means

  • Identified the printer or class and server with lpstat before touching anything.
  • Stopped new work with cupsdisable --hold rather than cancelling the queue.
  • Left a short, non-sensitive reason for any operator who checks the destination later.
  • Finished maintenance before releasing the queue with cupsenable --release.
  • Confirmed the result: lpstat -p shows enabled, lpstat -o shows the expected queue.
  • Used -c only for a deliberate, confirmed cancellation, never as a shortcut.