Clear print queue command line sequence

Here’s an old, old, but still useful tip that works on all NT-based versions of Windows (including Windows 7 and Windows 10). I wrote about this years ago but longtime reader Jim couldn’t find it here anymore, and I can’t either, so I’ll repost it for posterity. This is the clear print queue command line sequence for Windows. It works from the standard Windows CMD prompt.

The clear print queue command line sequence

clear print queue command line sequence
If your printer won’t print because some job is stuck in the print queue, you need my magic 3-command clear print queue command line sequence.

Open a command prompt (CMD.EXE), and issue these three commands:

net stop spooler
del /q c:\windows\system32\spool\printers\*
net start spooler

If you keep your printers folder open, you’ll see your stuck print jobs disappear, like magic.

If you’ve moved your print spooler to a ramdisk, like I recommend, substitute that directory for c:\windows\system32\spool\printers in the second line.

When you have a print job that’s stuck and keeping you from using your printer, this clear print queue command line sequence will get rid of it more reliably than any other method. It’s fast. It’s less infuriating than right-clicking on a hung print job and then waiting 15 minutes for it to finally disappear. If you find yourself doing this a lot, you might want to save it as a batch file and keep it someplace handy.

Further reading

I’ve collected most of my scripting resources in a single post about scripting Windows sysadmin tasks.

%d bloggers like this:
WordPress Appliance - Powered by TurnKey Linux