1821066 Members
2747 Online
109631 Solutions
New Discussion юеВ

Printer - can't delete

 
Chrisl_2
Frequent Advisor

Printer - can't delete

HPUX 11iv2 PARISC

Hi all,

I'm in that situation again where I need to remove a printer and just can't seem to be able to do it. I get a "printer non-existent" whenever I reference it. SInce getting the error I have:

Note: it is defined as a network printer

mkdir /var/spool/lp/request/printername
touch /etc/lp/interface/printername
touch /etc/lp/member/printername

chmod 755 all
chown lp:bin all
lpshut;lpadmin -xprintername

I have also done all the above, then tried
removequeue -q printername

I have had this problem in the past, can't remember how I got past it (but I didn't have to remove all of my printers)...also, I don't think that I can count on restore spool, as I haven't saved the spool recently.

Thanks in advance!!!!!!!!!



8 REPLIES 8
Court Campbell
Honored Contributor

Re: Printer - can't delete

Does the print queue actually exist? What is your output from lpstat?
"The difference between me and you? I will read the man page." and "Respect the hat." and "You could just do a search on ITRC, you don't need to start a thread on a topic that's been answered 100 times already." Oh, and "What. no points???"
OldSchool
Honored Contributor

Re: Printer - can't delete

cd to /var/spool/lp, then run

find . -name "xxx" -follow

where xxx is your printer name. you shouldn't find anything. if you do, remove it
Court Campbell
Honored Contributor

Re: Printer - can't delete

OS,

that won't remove the data about the queue from pstatus, qstatus, etc.
"The difference between me and you? I will read the man page." and "Respect the hat." and "You could just do a search on ITRC, you don't need to start a thread on a topic that's been answered 100 times already." Oh, and "What. no points???"
Geoff Wild
Honored Contributor

Re: Printer - can't delete

Why are you???:

mkdir /var/spool/lp/request/printername
touch /etc/lp/interface/printername
touch /etc/lp/member/printername

chmod 755 all
chown lp:bin all
lpshut;lpadmin -xprintername

Did someone delete those files?

If so - you should restore them from your backup...

Then try to delete...

Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
skt_skt
Honored Contributor

Re: Printer - can't delete

what is the method used to create the queue?

did u try -f option with "removequeue"? and what is the exit code on failure?
paste the outputs of

lpstat -vqname;lpstat -oqname;lpstat -pqname;
lpstat -a|grep qname
Haniza
Advisor

Re: Printer - can't delete

Hi Chrisl

Try add your printername at /usr:
mkdir /usr/spool/lp/request/printername

Then, delete your printername via:
lpshut;lpadmin -xprintername
Chrisl_2
Frequent Advisor

Re: Printer - can't delete

Thanks to all for your responses. The problem seemed to be some corruption somewhere in the printing configuration because I just could not remove the printer. I went thru the process of recreating the printer so that I could try removing it once again. But that didn't work....so, I restored the spooler from sam, then simply lpadmin -xprintername and boom, it was gone.
Chrisl_2
Frequent Advisor

Re: Printer - can't delete

restore print spool from sam and then lpadmin -xprintername