Software & AppsOperating SystemLinux

How To Clear Print Queue in Ubuntu

Ubuntu 4

In this article, we will guide you through the process of clearing the print queue in Ubuntu, a common task that can help resolve issues with stuck print jobs. We will explore three different methods: using the command line, the printer dialog, and the CUPS web interface.

Quick Answer

To clear the print queue in Ubuntu, you can use the command line, the printer dialog, or the CUPS web interface. Using the command line, you can view the list of print jobs, identify the job number, and remove specific jobs or all jobs. In the printer dialog, you can open the printer settings, navigate to your printer, and delete print jobs. The CUPS web interface allows you to access the web interface, locate the print jobs, and cancel them.

Clearing Print Queue Using the Command Line

The command line is a powerful tool that can help you manage your print queue efficiently. Here’s how to do it:

  1. Open a Terminal You can do this by pressing Ctrl+Alt+T or by searching for ‘Terminal’ in your system’s application launcher.
  2. View the list of print jobs Type the command lpq -a and press Enter. This command will display a list of all the current print jobs.
  3. Identify the job number Each job in the print queue is assigned a unique job number. Identify the number of the job you wish to remove.
  4. Remove a specific job To remove a specific job, type lprm <job number> and press Enter. Replace <job number> with the actual number of the job you want to remove. For example, if the job number is 5, you would type lprm 5.
  5. Remove all jobs If you want to remove all jobs from the print queue, type lprm - or cancel -a -x and press Enter.

Clearing Print Queue Using the Printer Dialog

If you prefer a graphical interface, you can use the printer dialog to clear the print queue:

  1. Open the Printer Settings Type “Printers” in the dash or your system’s application launcher to open the printer settings.
  2. Navigate to Your Printer Find and select your printer from the list.
  3. Delete Print Jobs Locate the print job(s) you want to remove in the list and click on the ‘Delete’ or ‘Remove’ button.

Clearing Print Queue Using the CUPS Web Interface

CUPS (Common Unix Printing System) also provides a web interface that can be used to manage print jobs:

  1. Access the CUPS Web Interface Open your web browser and navigate to http://localhost:631/jobs/.
  2. Delete Print Jobs Locate the print job(s) you want to remove and click on the ‘Cancel Job’ button.

Conclusion

Clearing the print queue in Ubuntu can be done in several ways, each with its own advantages. Whether you prefer using the command line, the printer dialog, or the CUPS web interface, this guide has you covered. Remember to replace <job number> with the actual job number when using the lprm command. Happy printing!

How do I open a Terminal in Ubuntu?

To open a Terminal in Ubuntu, you can press Ctrl+Alt+T or search for ‘Terminal’ in your system’s application launcher.

How can I view the list of print jobs in the print queue?

To view the list of print jobs in the print queue, you can use the command lpq -a in the Terminal or navigate to the printer settings and locate the print job list.

How do I remove a specific print job from the queue using the command line?

To remove a specific print job from the queue using the command line, you can use the command lprm <job number>. Replace <job number> with the actual number of the job you want to remove.

How do I remove all print jobs from the queue using the command line?

To remove all print jobs from the queue using the command line, you can use the command lprm - or cancel -a -x.

How do I delete print jobs using the printer dialog?

To delete print jobs using the printer dialog, open the printer settings, select your printer, and locate the print job(s) you want to remove in the list. Then, click on the ‘Delete’ or ‘Remove’ button.

How can I access the CUPS web interface to delete print jobs?

You can access the CUPS web interface by opening your web browser and navigating to http://localhost:631/jobs/. From there, you can locate the print job(s) you want to remove and click on the ‘Cancel Job’ button.

Leave a Comment

Your email address will not be published. Required fields are marked *