Indemnity83

Ramblings and musings of a technology addict

Aside

Remove a stuck print job in Windows

19 comments

I have often received a call, or gone out to a site where there is a print job stuck in the print que on the server that is holing up everything. You can try to cancel the job at the printer, or at the server. You’ve tried to restart the server and restart the printer but the print job just sits there staring at you the whole time. While not as bad as upsetting as the famed “PC LOAD LETTER” error it can still make you want to chuck your printer and/or computer off the roof.

So how do you purge the vexing print que? It’s actually easier than you might think. It only takes three lines typed in to your command prompt (you can do it through the Windows GUI too, but its easier this way).

First though, before we can execute anything you need the command prompt. And while this tutorial works for Windows XP, Windows Vista and Windows 7, but there are two different ways of getting to the command prompt with the privileges we need.

Windows XP

  1. Log into the computer with a user that has administrative privileges (most accounts do, so if you’re not sure just use the account you normally log in with).
  2. Click on Start -> Run
  3. Type “cmd” in the run box and click OK

Windows Vista & 7

  1. Click on the start orb and type “command” in the search box
  2. Once you see command prompt in the list of results, right-click on it and select “Run as Administrator
  3. You will likely be prompted for an administrator confirmation, or a password. Type your password or click Continue.

Clear the Print Que

Now that you’re at the command prompt, simply type these three commands to clear everything out of the que.

NET STOP spooler
DEL %SYSTEMROOT%\System32\spool\PRINTERS\* /Q
NET START spooler

Tada! Your printer can go back to printing now.

What does it do?

I’m glad you asked, its always good to know whats going on before you blindly type things in. Here’s whats going on. There is a service (a program that runs the background all the time) called the print spooler (or just spooler). Its job is to take print jobs from programs and send them to the printer. When you print something from a program like Word the spooler service creates two temporary files in %System32%\spool\PRINTERS and if everything is running well, it then sends this file over whatever connection the computer as to the printer (USB, Parallel or TCP/IP).

Sometimes though (more often than it should) the spooler service gets stuck on one of these temporary files. and it gums up the process. unfortunately though if you try to just delete the files Windows wont let you because they are in use by the spooler service. So the above commands tell Windows to close the spooler service (which releases the files), then we delete all the files that are in the print que, and finally we start the spooler service back up so we can continue printing.

Updated March, 2011 for Window 7

Written by Kyle

June 9th, 2008 at 4:37 pm

  • Becca

    Very helpful Kyle. But all I can think about is the scene from Office Space where they beat the copier/printer (or maybe it was a fax machine?) to pieces. I don’t recommend it, but that will remove any stuck print job too :P

  • x

    Becca, you have not been paying attention o what Kyle wrote. Stuck print jobs are caused by the computer OS not the printer, so you can destroy all the printers you want, it won’t help a bit.

  • Bergie

    Thanks, that worked for me, but I didn’t follow your instructions to the letter. You don’t explain where to type in the instructions, all on one line or how? I typed the 1st. line of instructions, pressed “enter” thinking I would go down one line and type the next line of instructions and a message said “spooler stopped” I thought ‘ok, that’s what I want, now to restart it’. I then typed the last line of instructions and “enter” and the spooler was ok again and the printer works fine. The stuck printing job printed, and all looks fine.
    I’ll keep a reference to your page just in case though. Thanks.

  • http://www.indemnity83.com Indemnity83

    @Bergie: The three lines are actually three commands. The middle command (the one you skipped) is there to actually remove the stuck job(s) from the printer spool so that they don’t print again when you turn the spooler service back on.

    As you found out though, sometimes all you need to do is stop and restart the service and it will happily print like nothing was ever wrong. But on occasion it will just get stuck again.

    Glad you got everything sorted out though, and glad I could help.

    @The_T: I’ll look into the problem user on the site, thanks for bringing it to my attention!

  • http://www.sriramharibabu.co.nr sriram haribabu

    hi,

    Thanks for the wonderful tip… i am a vista user and i love the OS …but some small problems like this annoy me at times …. now my annoyance – 1 … he he …

  • http://www.skinconsortium.com pjn123

    Thanks for this GREAT tip!

    This is so frustrated when you print and forgot to put it on. have to delete it normally, restart system, and hope its gone.

    Now its very easy!

    Created a little bat file for those that want a quick way to do the above.

    http://stashbox.org/246757/Clear%20Print%20Jobs.zip

  • brandon

    Hello, Thank you for this. I was just about tempted to through the printer out the window, or shoot it or both.

  • http://www.indemnity83.com Indemnity83

    @pjn123

    Awesome job with the batch file!

    Just a side note for any Vista users who want to use pjn’s batch file, you will need to Right Click -> Run as Administrator to have it run successfully

  • http://www.soft-news.net Software Blog

    Any more news about this subject? Remove a stuck print job in Windows | Indemnity83

  • Dana

    I tried to run the bat file above in Vista, where do you “Right Click -> Run as Administrator”?

    Also, I tried the original posters remedy and I got an error message.

    Still have no resolution for stuck print jobs using Lexmark X2350 on Vista….HELP?!?

  • http://indemnity83.com Kyle Klaus

    @Dana

    You need to right click on the bat file itself. Then you should see an option to “Run as Administrator”.

    If that still doesn’t work, let me know what error you get when you try doing it as outlined in the post.

  • http://www.bradkovach.com Brad Kovach

    I’ve used a well-written batch file that corrects many printer problems (like spooler dependency problems with Lexmark printers). I released it on my website a few years ago.

    Recently, I released a GUI version for XP/Vista of my batch file that’s a little less intimidating and gives a little better information relating to the problem.

    http://www.bradkovach.com/printflush/
    and
    http://www.bradkovach.com/printflush/forwindows/

  • http://indemnity83.com/remove-stuck-print-job goesygirl

    THIS WORKS !!
    After 6 hours of trying everything over and over again and searching the web for why the print spool would not work and deleting drivers and adding new drivers Then I finally found this site and wow– THIS WORKED!!!! THANK YOU SO SO MUCH

  • Ian

    How do I save a stuck print job? I have a lexmark 4550, and my document is just sitting there with the status saying “spooling – restarting.” I really don’t want to delete the document, because it comes from the net and only has a limited amount of prints (can’t print it again from this computer). Other documents will print, just not this one. Is there a way to get that job to print?

  • http://www.nottheeternaltao.blogspot.com/ jimstoic

    Thanks. I appreciate that you took the time to put that up.

  • Jerry

    Great tip, this has been saved!!! thanks for making it available

  • http://google nannygranny

    hi ive used bradkovach flush it gets rid ok only thing is soon as i try to print from graphtec printer it gets stuck again my canon pixma mp220 works fine on same pc need help please

  • Anne

    Great advice.
    Thank you.

  • Grateful

    Thanks for the help….it worked for my Think Pad :)