Batch Deleting Printers

I’d like to remove around 2,400 printers from the database (that were added before I discovered the “ignore printers” option, and was wondering if there is a way I can write or get a script to delete them?

It’s possible to manually remove printers in PaperCut, as documented in our manual, Add and remove/delete/ignore printers, but that can mean a lot of clicks when you have hundreds or even thousands of printers in PaperCut. So what should you do?

Thankfully as with anything in PaperCut there’s usually half-a-dozen ways to solve the problem.

  • If your setup is in testing at the moment, one simple option could be simply uninstall and re-install resetting the data.
  • If you are wanting to do this after renaming your print server, we have an article just for that over here: Removing duplicate printers after a server name change.
  • Or if you are the industrious type, it’s possible to script this using the delete-printer method in our Server Command API.

Deleting printers in bulk from PaperCut with Server Commands

  1. On the PaperCut server open a command prompt as an administrator.
  2. Navigate the the server-command directory, for example on a 64-bit Windows server running PaperCut NG, you could use the command: cd C:\Program Files\PaperCut NG\server\bin\win.
  3. Run the command server-command delete-printer <servername> <printername>.
    • Repeat that line above for each printer to delete. To make this go really quickly, you can download a CSV list of printers from PaperCut (on the Printers tab, scroll to the bottom and click the small green CSV icon). Then open that file in your favorite spreadsheet editing program, and then use the CONCATENATE function to build out a list of server commands to delete all the printers you want to get rid of.
    • If you want to delete all printers on a particular server, you can use the following command: delete-printer <server_name> “[All Printers]”. Just replace the <server-name> with the name of the server. You must use the quotes around the [All Printers] text.

What if you deleted the printers but they reappear in PaperCut? Well, that’s because some PaperCut Secondary Server or workstation running the Direct Print Monitor is out in your network running the Print Provider service and is reporting it’s list of printers to the PaperCut server. You’ll need to track down that workstation or server and uninstall the software, or configure it to ignore the specific printers.


Categories: How-to Articles, Print Queues


keywords: delete, bulk delete, remove multiple printers

Comments