Operating System - HP-UX
1832595 Members
2877 Online
110043 Solutions
New Discussion

Re: Removing printer queue doesn't work

 
SOLVED
Go to solution
Maarten van Maanen
Regular Advisor

Removing printer queue doesn't work

Somehow I managed to create two queues with the same name: Systeemprinter
I've deleted Systeemprinter but I still keep seeing the other one. Stopped and started spooler serveral times. Output of lpstat -t is:
/# lpstat -t
scheduler is running
system default destination: Systeemprinter
device for Systeemprinter: /dev/null
Systeemprinter accepting requests since Aug 30 12:03
printer Systeemprinter disabled since Aug 30 12:03 -
reason unknown
fence priority : 0

Were is/are the spooler definitions stored. Can I manually delete these and start all over again ??
12 REPLIES 12
John Palmer
Honored Contributor

Re: Removing printer queue doesn't work

Maarten,

Try the following:-

lpshut
lpadmin -xsysteemprinter
lpsched

That should remove it.
Maarten van Maanen
Regular Advisor

Re: Removing printer queue doesn't work

I tried the command after shutting down lpsched (again), but what I get is:

/# lpadmin -xSysteemprinter
lpadmin: destination "Systeemprinter" non-existent
James R. Ferguson
Acclaimed Contributor

Re: Removing printer queue doesn't work

Maarten:

You can also search /var looking for "Systeemprinter":

# find /var -name Systeemprinter* -exec rm -i {} \:

...JRF...

John Palmer
Honored Contributor

Re: Removing printer queue doesn't work

Maarten,

As this is your only printer, you could try the following:-

lpshut
cd/var/spool/lp

Take a copy of the files outputq, pstatus and qstatus then empty them with
> outputq
> pstatus
> qstatus

cd request
rm -r systeemprinter (if it exists)

cd /etc/lp

find . -name systeemprinter -exec rm -r {} \;

Then try recreating your printer queue.
Victor BERRIDGE
Honored Contributor

Re: Removing printer queue doesn't work

Hi Maarten,
Ive been through that not so long ago, seeing printers Ive removed in SAM...
I dint find anything else to recreate ba hand the printers, copying an existing one to the name of the removed printers in ~/model.orig etc...
correcting them (put inside the correct name and/or IP)
in order to remove them again with SAM this time
It worked...
Any printer will do as model since you are not going to print but remove them...

Good luck

Ah I remember now, I removed them with jetadmin....
Bad choice it seems
CHRIS_ANORUO
Honored Contributor

Re: Removing printer queue doesn't work

Check /etc/lp/interface
When We Seek To Discover The Best In Others, We Somehow Bring Out The Best In Ourselves.
Nancy Hubert
Occasional Advisor
Solution

Re: Removing printer queue doesn't work

if you try to remove a printer with lpadmin and you get:

printer non-existent

just follow these procedures to remove the remote printer:

1. Create the following if they do not exist, with permissions
755 and owner of lp:

#mkdir /var/spool/lp/request/printer_name
#touch /etc/lp/interface/printer_name
#touch /etc/lp/member/printer_name

Use chown(1) to change ownership to lp, and chmod(1) to change
permissions.

2. #lpadmin -x


Now, if you issue the command:

#lpstat -a

the printer should be gone.
Maarten van Maanen
Regular Advisor

Re: Removing printer queue doesn't work

Ok, I've done the following:

I had already removed all Systeemprinter-files in /var (with no succes)
I deleted all output, pstat and qstatus files in /var/spool/lp
Then followed the instructions from Nancy Hubert. After that, Systeemprinter seems to be gone. Started lpsched and run lpstat -t
Now I only get:
C2000NL1/# lpstat -t

scheduler is running
system default destination: Systeemprinter

Still would like to know how to remove this "System default destination:" though..
John Palmer
Honored Contributor

Re: Removing printer queue doesn't work

lpadmin -d
Maarten van Maanen
Regular Advisor

Re: Removing printer queue doesn't work

Should have looked in man lpadmin for that, I know. But where does HPUX store this default desitnation.
John Palmer
Honored Contributor

Re: Removing printer queue doesn't work

/var/spool/lp/default would you believe?
Maarten van Maanen
Regular Advisor

Re: Removing printer queue doesn't work

I do believe in. Works also. No printer or printqueues left anymore.