Operating System - HP-UX
1760817 Members
3468 Online
108895 Solutions
New Discussion юеВ

Deleting queues in hp-ux B.11.23

 
SOLVED
Go to solution
Manuales
Super Advisor

Deleting queues in hp-ux B.11.23

Hi, how can i delete the configuration of 2000 printers? i mean the queue configuration.
I want to create a script but i am not sure where the configuration is created (paths, configuration files, etc) when a queue is added into the system.
Also i need to make a backup before deleting the configuration of all those 2000 printers.

Please give me suggeestions.
Note: i know that i can do it using sam but i need to create the script instead of delete one by one.
13 REPLIES 13
Dennis Handly
Acclaimed Contributor
Solution

Re: Deleting queues in hp-ux B.11.23

You can use SAM to make a backup.

You can use lpstat(1) to get a list of printers then loop on "lpadmin -xdest" to remove each one.
Manuales
Super Advisor

Re: Deleting queues in hp-ux B.11.23

I found this command:
removequeue -q dilbert -f

when this command is used, what configurations files are deleted? (what path? )
Manuales
Super Advisor

Re: Deleting queues in hp-ux B.11.23

Hi Denniss, if i use sam for the backup? what are the steps to do that? i have 4000 printers configured, i only need to delete 2000? can i do that manually?

Manuales
Super Advisor

Re: Deleting queues in hp-ux B.11.23


what is the difference in using below commands?

removequeue -q queuename -f

lpadmon -xqueuename
Dennis Handly
Acclaimed Contributor

Re: Deleting queues in hp-ux B.11.23

>if i use sam for the backup? what are the steps to do that?

Something to do with save and restore spooler config. Lots of threads about this:
http://forums.itrc.hp.com/service/forums/questionanswer.do?threadId=1011463

>I only need to delete 2000? can I do that manually?

Do you have a list of them?
for printer in $(< delete-list); do
lpadmin -x$printer
done
Manuales
Super Advisor

Re: Deleting queues in hp-ux B.11.23

Hi Dennis
thanks a lot ..

i would like to know what directory paths are affected when i apply

lpadmin -x$printer

thanks.
Tim Nelson
Honored Contributor

Re: Deleting queues in hp-ux B.11.23

man lpadmin

FILES
/var/spool/lp/*
/var/adm/lp/*
/etc/lp/*
/usr/lib/lp/*

Manuales
Super Advisor

Re: Deleting queues in hp-ux B.11.23

thanks!!!
what is the difference in using below commands?

removequeue -q queuename -f

lpadmon -xqueuename
Bill Hassell
Honored Contributor

Re: Deleting queues in hp-ux B.11.23

> what is the difference in using below commands?

> removequeue -q queuename -f

This is part of the hppi package for HP JetDirect print interfaces. It is not designed for remote printers or direct-connect printers such as serial or parallel.

lpadmon -xqueuename

I believe you meant lpadmin -x and this is the lp spooler command to remove remote and direct-connect printers, but not HP JetDirect connections.


Bill Hassell, sysadmin