Clearing the Print Spooler Queue on Windows

PowerADM.com / Windows / Windows 10 / Clearing the Print Spooler Queue on Windows

If you have a large number of network printers connected to your Windows print server, you may find that the print queue gets stuck from time to time. A stuck job in the print queue prevents other documents from printing. In this case, you should try to remove the stuck print job or clear the print queue completely.

Remove a Stuck Pring Job from the Print Spooler Queue

Try using the Print Management console (printmanagement.msc) to soft-clear the print queue. Expand All Printers -> Right-click on your printer and select Open Printer Queue.

Find the stuck document job in the print jobs list and cancel it.

cancel print job

If this does not solve the problem, try deleting the entire print queue from the print queue management menu (Printer -> Cancel all documents).

Check that the Pause Printing or Use Printer Offline options are not enabled in the print queue management menu.

Disable the option "Use printer offline"

If the soft queue clean doesn’t work and you can’t restart the print server immediately, you can try deleting the print job files from the hard disk manually.

When the Print Spooler service receives a document, it creates two files in the %systemroot%\System32\spool\PRINTERS directory. One with the .SHD file (contains the print task settings) and the other with the .SPL extension (contains the raw data to be printed). These files are automatically deleted from both this directory and the print queue after successful printing.

If you open an SHD file using Notepad, you can see the document name, printer, and user who submitted the print job.

SHD and SPL print spooler files

You can remove a stuck document from the print queue by manually deleting the job’s SHD and SPL files. For that, stop the spooler service (services.msc console -> Print Spooler -> Stop).

stop print spooler service

Then delete the job files from the disk and start the print spooler service. Open the print queue management window and check that the stuck job has been deleted.

How to Forcefully Clear the Print Spooler Queue on Windows

If the previous method did not help, you can completely clear the print queue on the print server. It will delete all (!!!) print jobs queued on all installed printers.

Open a command prompt as an administrator and run the following commands in sequence:

net stop spooler
del %systemroot%\system32\spool\printers\*.shd /F /S /Q
del %systemroot%\system32\spool\printers\*.spl /F /S /Q
net start spooler

If you prefer PowerShell, you can clear the print queue with this script:

Get-Service *spool* | Stop-Service -Force -Verbose
Start-Sleep -Seconds 5
$path = $env:SystemRoot + ”\system32\spool\printers\”
Get-ChildItem $path -File | Remove-Item -Force -Verbose
Get-Service Spooler | Start-Service -Verbose

If you find that old documents are piling up in your print queues, you can periodically remove them. For example, the following script will remove all documents that are older than 2 days from the print queue.

Get-Printer | get-printjob | where{$_.SubmittedTime -lt ((Get-Date).adddays(-2))} | Remove-PrintJob
Leave a Reply

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