New printing system - best practice

rob_potvin
Contributor III
Contributor III

I have about 50 new printers and a new printing system now being put in place, fully centralized paper cut MF.

Teachers and students are away, and was wondering if anyone knew that one line or script needed to "Reset Printers System"

Somewhere on the internet I did find a one liner that would reset the printer system but for the life of me I can't find it in the bowls of the net.

That way I can reset all printers on machines and install the one default printer needed.

Thanks

Rob

3 REPLIES 3

Dtwerdohlib
New Contributor III

This is what my co-worker made about a year ago to "Reset the Printing System"

killall cupsd
lpstat -p | cut -d' ' -f2 | xargs -I{} lpadmin -x {}
cupsd

I've only ever tried these commands on Leopard though. So you might want to test it first. Hope this helps

stevewood
Honored Contributor II
Honored Contributor II

Down and dirty, in a Bash script:

rm -rf /etc/cups/printers.conf | killall -HUP cupsd

That should do the trick.

Steve Wood
Director of IT
swood at integer.com

The Integer Group | 1999 Bryan St. | Ste. 1700 | Dallas, TX 75201
T 214.758.6813 | F 214.758.6901 | C 940.312.2475

rmanly
Contributor III

lpadmin is a little cleaner. Like below or with Dan's method above.

Just tested it does still work in Lion. So, 10.5, 10.6, and 10.7 should be
fine.

for file in /etc/cups/ppd/* ; do path=${file%.ppd} name=${path##*/} lpadmin -x "${name}"
done

Ryan M. Manly
Glenbrook High Schools