LinuxCommandLibrary

cupsdisable

Disable printers or printer classes

TLDR

Stop one or more destination(s)

$ cupsdisable [destination1 destination2 ...]
copy

Cancel all jobs of the specified destination(s)
$ cupsdisable -c [destination1 destination2 ...]
copy

SYNOPSIS

cupsdisable [ -E ] [ -U username ] [ -c ] [ -h hostname[:port] ] [ -r reason ] destination(s)

PARAMETERS

-E
    Forces encryption when connecting to the CUPS server.

-U username
    Specifies the username to use for authentication with the CUPS server.

-c
    Disables a printer class instead of a printer.

-h hostname[:port]
    Specifies an alternate CUPS server to connect to. The default is the local host.

-r reason
    Provides a human-readable reason for disabling the printer or class. This reason is often displayed by queue status commands like lpstat.

destination(s)
    One or more printer names or class names (if -c is used) to be disabled. At least one destination is required.

DESCRIPTION

The cupsdisable command is a utility provided by the Common Unix Printing System (CUPS) that allows administrators to disable specific printers, printer classes, or individual print jobs. When a printer or class is disabled, it will no longer accept new print jobs, and any jobs currently queued for that destination will remain pending until the printer is re-enabled using cupsenable. This command is crucial for managing print queues, especially when a printer requires maintenance, is out of order, or needs to be taken offline temporarily without disrupting the print server.

You can specify one or more printer or class names as arguments. Optionally, a reason for disabling can be provided using the -r option, which is visible in print queue status. Disabling a printer effectively pauses its operation from the CUPS server's perspective, ensuring that users cannot send new print tasks to it. This mechanism is vital for maintaining system stability and preventing print job failures when hardware issues or administrative tasks are underway.

CAVEATS

Permissions: Disabling printers typically requires administrative privileges (e.g., root or a member of the lpadmin group) on the CUPS server. Without proper permissions, the command will fail with an authorization error.
Job State: Jobs already sent to a printer before it was disabled will remain in the queue (pending) and will not print until the printer is re-enabled. No new jobs will be accepted while disabled.

<I>IMPACT ON PRINT JOBS</I>

When a printer is disabled using cupsdisable, it stops accepting new print jobs. Any jobs already in the queue for that printer will remain 'held' or 'pending' and will only be processed once the printer is re-enabled using the cupsenable command. This ensures that no jobs are lost during maintenance or troubleshooting.

<I>CHECKING PRINTER STATUS</I>

After using cupsdisable, you can verify the status of the printer or class using the lpstat -p command. This command will typically show the printer as 'disabled' and often display the reason provided with the -r option, if one was specified.

HISTORY

The cupsdisable command is an integral part of the Common Unix Printing System (CUPS), which was originally developed by Easy Software Products. CUPS replaced older printing systems like LPR/LPD on many Unix-like operating systems, providing a modern and standardized approach to printing. cupsdisable, along with cupsenable, was designed as a fundamental administrative tool to manage printer states, reflecting CUPS's focus on robust network printing capabilities and simplified administration. Its core functionality has remained consistent since early CUPS versions.

SEE ALSO

cupsenable(8), lpadmin(8), lpstat(1), cancel(1)

Copied to clipboard