Operating System - HP-UX
1751975 Members
4329 Online
108784 Solutions
New Discussion юеВ

Re: Unable to remove print queue

 
SOLVED
Go to solution
so.nimda
Super Advisor

Unable to remove print queue

Hi,

I am doing a cleanup of all the print queue in my system and while I was able to use "removequeue -q" to remove them, there's this one particular one that won't be removed.

I also tried using SAM to remove but still it won't go.

I tried also to use "lpadmin -x" but it's still there.

How do I remove it?

Thanks
18 REPLIES 18
sarfaraj ahmad
Trusted Contributor

Re: Unable to remove print queue

Hi,

have you tried with below command,
# cancel -e

please check the below link for your reference which may be useful to resolve your problem,

http://forums13.itrc.hp.com/service/forums/questionanswer.do?admit=109447627+1285567872843+28353475&threadId=1218672

Thanks.
Hakki Aydin Ucar
Honored Contributor

Re: Unable to remove print queue

Hi,

cancel [id ...] [printer ...] [-a] [-e] [-i] [-uuser]

try manpage of cancel, lp ;
# man cancel
Kevin Lister
Frequent Advisor
Solution

Re: Unable to remove print queue

Howdy,

Folks, I think he is attempting to remove the queue itself and not the message in the queue.

Is that correct?

Did you try to use the -f switch with the removequeue command? The -f switch should force the removal.

Are you getting any error messages? If so can you please post?

thanks,

kev
so.nimda
Super Advisor

Re: Unable to remove print queue

Hi Kevin,

You are right. I am trying to remove the entire queue.

Here's the error :

# lpstat -pPRT6455
lpstat: printer "PRT6455" non-existent

# removequeue -q PRT6455 -f
Could not cancel jobs for PRT6455

# lpadmin -xPRT6455
lpadmin: destination "PRT6455" non-existent

I would like to remove this and recreate (or add) again.

Thanks & regards
Kevin Lister
Frequent Advisor

Re: Unable to remove print queue

Ok. Let's gather a little info.

Is the printer queue you are trying to delete on the server that contains the spool?

Please post the results of the following:

cd /etc/lp
find . -name PRT6455

cd /var/spool/lp
find . -name PRT6455

kev
so.nimda
Super Advisor

Re: Unable to remove print queue

Hi Kevin,

Result as follows :

root [/etc/lp]
# find . -name PRT6455
./interface/PRT6455
./interface/model.orig/PRT6455
./member/PRT6455

root [/var/spool/lp]
# find . -name PRT6455

root [/var/spool/lp]
#

It can be found in "/etc/lp" but not "/var/spool/lp".

Thanks
Kevin Lister
Frequent Advisor

Re: Unable to remove print queue

Ok. So try this first:

cd /var/spool/lp/request
mkdir PRT6455
chown lp:lp PRT6455
chmod 755 PRT6455

/sbin/init.d/lp stop
/sbin/init.d/lp start

You may want to look in /var/adm/syslog/syslog.log for any messages that may come up about the spooler. If no errors then proceed.

Then start SAM. Double-click "Printers and Plotters", then "LP Spooler", then "Printers and Plotters".

Select the line with PR6455 from the list of spoolers.

Click on "Actions" and then click on "Remove".


If that fails to work then you may try the brute force method of removing the files by hand.

Try this if the first method above doesn't help:

/sbin/init.d/lp stop
cd /var/spool/lp/request
rm -r PR6455
cd /etc/lp

rm interface/model.orig/PR6544
rm interface/PR6544
rm member/PR6544

cd /var/sam/lp

rm member/it_laser
rm interface/it_laser
rm interface/model.orig/it_laser

/sbin/init.d/lp start

Let us know how it goes.

kev

PS

Keep in mind that stopping and starting the printer spooler may interrupt someones print job! So, be careful. ;o)

so.nimda
Super Advisor

Re: Unable to remove print queue

Hi Kevin,

Thanks for your patience and detailed reply.

I have tried the first part (SAM -> Actions -> Remove) and the error is :

"Lp destination "PRT6455" does not exist on ."

By brute force, I have removed all files named "PRT6455" in the following directories :
- /var/spool/lp/request/
- /etc/lp/interface/model.orig/
- /etc/lp/interface/
- /etc/lp/member/
- /var/sam/lp/interface/model.orig/
- /var/sam/lp/interface/
- /var/sam/lp/member/
- /var/sam/lp/cinterface/
- /var/sam/lp/sinterface/

Just to confirm that all traces of "PRT6455" has been removed, I do a "find . -name PRT6455 -print", there are no more files found.

But when I go to "SAM->Printers and Plotters->LP Spooler->Printers and Plotters", I can still see "PRT6455".

This printer is stubborn.... :(

Thanks

Kevin Lister
Frequent Advisor

Re: Unable to remove print queue

Hmmm. Do you see an entry for the printer in this file:

/var/sam/lp/lpinfo

If so, remove it!

Let me know. ;o)

kev