TransWikia.com

Cannot delete print job on Ubuntu 18.04

Ask Ubuntu Asked by Manfred Steiner on December 3, 2021

If I print something and the printer is not available, the print job is queued and the queue can be shown, using the global configuration menue (Devices -> Printers). There for each printer device the number of pending jobs is shown as button. Selecting this button opens a dialog window with a list of pending jobs. Every job in one line is combined with buttons. One of this buttons is a cancel button. But selecting this cancel-button does not do anything.

How can I delete pending print jobs?
Is there any workaround with a shell command?

One Answer

You can use the lprm command:

Use

man lprm 

to get a description.

To delete all queued jobs:

lprm -

NAME lprm - cancel print jobs

SYNOPSIS

   lprm [ -E ] [ -U username ] [ -h server[:port] ] [ -P destination[/instance] ]
   [ - ] [ job-id(s) ]

DESCRIPTION

lprm cancels print jobs that have been queued for printing. If no arguments are supplied, the current job on the default destination is canceled. You can specify one or more job ID numbers to cancel those jobs or use the - option to cancel all jobs.

OPTIONS

   The lprm command supports the following options:

   -E   Forces encryption when connecting to the server.

   -P destination[/instance]
        Specifies the destination printer or class.

   -U username
        Specifies an alternate username.

   -h server[:port]
        Specifies an alternate server.

   The  CUPS  version of lprm is compatible with the standard Berkeley command of the same name.

EXAMPLES

  • Cancel the current job on the default printer:

      lprm
    
  • Cancel job 1234:

      lprm 1234
    
  • Cancel all jobs:

      lprm -
    

Answered by abu_bua on December 3, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP