Pause a CUPS Printer Safely with cupsdisable
You will pause a CUPS printer or class, leave its queued jobs intact, and resume it when maintenance is finished. The examples use cupsdisable and cupsenable from cups-client version 2.4.7-1.2ubuntu7.14.
The route
Jump straight to the step you need, or tick off Done means at the end.
- 1. Find the exact destination name
- 2. Stop new jobs while allowing the current job to finish
- 3. Leave a useful reason for other operators
- 4. Perform the maintenance, then release the queue
- 5. Resume a printer that was stopped without a hold
- 6. Treat cancellation as a separate decision
- 7. Connect to the right CUPS server
Allow about ten minutes, plus any time needed for the printer work. You need a shell, a destination name, and permission to administer that CUPS server. The commands that change printer state may ask for authentication; use sudo only if your local CUPS policy requires it.
Checkpoint
This guide distinguishes pausing new work from cancelling queued jobs. Do not add -c unless you have deliberately decided that those jobs can be discarded.
1. Find the exact destination name
Start with a read-only status query. Replace the placeholder server only 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, omit -h:
$ lpstat -p -d
Use the name after printer as the destination. CUPS printer and class names are not case-sensitive, but names cannot contain a space, tab, slash or hash character. A class is a group of printers and can be passed to the same commands.
If lpstat says that the scheduler is not running, stop here. There is no local CUPS scheduler available to administer. Check the service using your distribution's normal service tooling, then repeat this step after it is running.
2. Stop new jobs while allowing the current job to finish
Use --hold when maintenance should wait for the job already in the printer but prevent later jobs from starting:
$ cupsdisable --hold office_laser
This changes printer state and may require elevated privileges or a CUPS password. It holds remaining jobs on the named printer. The option is useful for replacing paper, clearing a path after the current page finishes, or arranging a short maintenance window.
Warning
Without --hold, cupsdisable stops the printer but does not promise that the current job will finish first. If the job in progress matters, use --hold before touching the printer.
Verify the state and inspect 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 status wording depend on the server. An empty lpstat -o result means there are no queued jobs; it is not an error.
3. Leave a useful reason for other operators
A disabled destination can carry a message visible to other CUPS clients. Supply a short reason with -r:
$ cupsdisable --hold -r "Replacing fuser unit" office_laser
Quote the reason so spaces stay part of one argument. If you omit -r, this installed command records the default message Reason Unknown. The reason is status information, not a ticketing system, so do not put passwords, access tokens or other secrets in it.
Checkpoint
Ask another client to view the destination if the message needs to be visible to remote operators. If the command reports an authentication or authorisation failure, check the CUPS policy and account before retrying. Do not work around it by sharing an administrator credential.
4. Perform the maintenance, then release the queue
Once the printer is ready, release jobs held by --hold and enable the destination:
$ cupsenable --release office_laser
--release releases pending jobs for printing. cupsenable starts the named printer or class again. Verify both parts:
$ 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 remain queued, check that the printer is enabled, has paper and can reach the CUPS server. A successful cupsenable command does not prove that the physical device is ready or that a print job has completed.
5. Resume a printer that was stopped without a hold
If you used plain cupsdisable office_laser, the matching recovery command is:
$ cupsenable office_laser
This resumes the destination. Use --release as well when jobs were explicitly held. The commands are safe to repeat when the destination is already in the requested state, although you should still verify the result with lpstat.
6. Treat cancellation as a separate decision
The -c option cancels all jobs on each named destination. That is a destructive queue operation: cancelled jobs are not merely paused, and these commands do not provide an undo button. Do not combine it with a routine maintenance pause.
$ cupsdisable -c office_laser
Use this only when the queued work is known to be obsolete or must be removed, and warn affected users first. If one job is the problem, inspect the queue with lpstat -o office_laser and use the narrower cancel command after confirming its job identifier. Check your local policy before cancelling work submitted by another user.
7. Connect to the right CUPS server
The -h server[:port] option selects the server and optional port. Use the same server for discovery, the state change and verification:
$ cupsdisable -h print-server.example:631 --hold -r "Paper feed maintenance" office_laser
$ lpstat -h print-server.example:631 -p office_laser -o
The -E option forces encryption for the connection. It protects the connection only when the selected server and its certificates are configured for encrypted CUPS communication; it is not a substitute for checking the server name. -U username selects the username used for authentication when your CUPS setup supports that flow.
Do not accidentally administer a similarly named printer on the local host. The most common distraction here is omitting -h on the state-changing command after using a remote server in the status check.
Done means
lpstatidentified the intended printer or class and server.cupsdisable --holdstopped new work without cancelling the queue.- A short, non-sensitive reason was recorded when other operators needed context.
- Maintenance finished before
cupsenable --releaseresumed queued jobs. lpstat -pshows the destination enabled, andlpstat -oshows the expected queue.-cwas used only for a deliberate, confirmed cancellation.