Shell script to delete all printers

The following shell script will delete all printers.
Make sure the file is executable after you create it (chmod ugo+x /path/to/delPrinters.sh).

#!/bin/sh

for printer in `lpstat -p | awk ‘{print $2}’`
do
echo Deleting $printer
lpadmin -x $printer
done

Source: Mac OSX Hints