Cannot delete printers on Windows 2008 R2

Today I was trying to delete a bunch of old printers from my Windows 2008 R2 server maybe something like 50 printers because most of them were offline or the IP addresses had changed and I needed to clean them up.

But when I right clicked the printer and selected "Delete" on the printer properties I got an "Error - Deleting" message on a lot of printers and they just wouldn't go away no matter what I did.

I tried stopping the Print Spooler service, deleted all the contents from C:\windows\system32\spool\printers" and started the spooler service and then tried deleting them but to no avail.

So here is what I did to get rid of those rogue printers from the print mgmt console

 

  •  Open Regedit (Be careful with this, modifying the registry in-correctly can mess up your system!)
  •  Browse to HKEY_LOCAL MACHINE\SYSTEM\CurrentControlSet\Control\Print\Printers
  •  Delete all the printer subkeys under this folder that you dont need.
  •  Restart the Print Spooler service and refresh you print mgmt console and they are gone!