Posted on 07-26-2011 08:18 AM
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
Posted on 07-26-2011 08:27 AM
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
Posted on 07-26-2011 08:27 AM
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
Posted on 07-27-2011 07:00 AM
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