Remove the retired CUPS printer destination oldlaser, not merely its queued jobs.
Which command is appropriate?
lpadmin -x DEST deletes the printer or class destination definition and can affect pending jobs.
Detailed explanation
lprm -P oldlaser -Incorrect. lprm cancels jobs but leaves the destination definition.
Incorrect. lprm cancels jobs but leaves the destination definition.
lpadmin -x oldlaserCorrect. lpadmin -x oldlaser removes the queue definition.
Correct. lpadmin -x oldlaser removes the queue definition.
lpoptions -x oldlaserIncorrect. lpoptions removes a saved option instance, not the printer.
Incorrect. lpoptions removes a saved option instance, not the printer.
lpstat -p oldlaserIncorrect. lpstat only displays status.
Incorrect. lpstat only displays status.
Try it yourself
An example you can run in a temporary verification environment.
printf '%s
' 'lpadmin -x oldlaser -> delete destination'Expected result
lpadmin -x oldlaser -> delete destinationKey points
- lpadmin manages queues
- -x deletes destination
- lprm only cancels jobs
Notes
- Environment: 管理操作の対応表のみ
- Command output formatting can vary slightly by distribution or tool version.
- Run the example in a temporary directory or process when possible.
Foundation review
Read the scope first
Check whether the command acts on the current shell, a new process, an existing process, or a file.
Verify the observable result
Use the supplied command and compare the output with the expected result.