1835949 Members
3408 Online
110088 Solutions
New Discussion

Re: can't remove printer

 
SOLVED
Go to solution
John Destreel
Occasional Advisor

can't remove printer

/usr/sbin/lpadmin: can't remove request directory because of directory not empty.

There are no files in the request directory.

Printer is not accepting prints and still is in status enabled/avccepting.

It's a remote printer.Doesn't make a difference if remote printer is up or down.

your advice pls...
To boldly crash where no one has crashed before : Windows XP
7 REPLIES 7
Steve Steel
Honored Contributor

Re: can't remove printer

Hi


Use ls -a on the directory

Bet there is a hidden file or the directory is not set to lp bin with access for lp


steve STeel
If you want truly to understand something, try to change it. (Kurt Lewin)
Victor BERRIDGE
Honored Contributor

Re: can't remove printer

Hi,
Did you cancel -e first?
To be sure no queue...
then disable the printer before removing it
with lpadmin -x


All the best
Victor
Bill Hassell
Honored Contributor

Re: can't remove printer

Check on the ownership of the request directory and any contents. Someone may have decided to 'improve' the security of the lp file structure. Try:

swverify PrinterMgmt

and look for errors in the LP area.


Bill Hassell, sysadmin
Sยภเl Kย๓คг
Respected Contributor

Re: can't remove printer

Hi John

1.#cancel -e
2.ensure that the directory /var/spool/lp/request/3.lpadmin -x printer_name
4.lpstat -t
5.Even if u are not able to remove by normal
method use this method(not recommended)

1.#lpshut
2.Delete /var/spool/lp/request/
directory
3.Delete /etc/lp/interface/
4.delete /etc/lp/member/
5.lpsched

regards
SK
Your imagination is the preview of your life's coming attractions
John Destreel
Occasional Advisor

Re: can't remove printer

Thanks for all of your submissions, but it still doesn't work for me.

Even after a cancel -e printer the request directory isn't empty. while there are no files in it.

swverify printermgmt : no errors.

Problem remains the request directory of the printer.
I can't remove the request directory of the printer.

I'm thinking of a restore from prior to this problem of the request directory.

Is this a valid option?

Thanks.
To boldly crash where no one has crashed before : Windows XP
Bill Hassell
Honored Contributor
Solution

Re: can't remove printer

As root, you can remove the request/printer_name directory and anything in it. Make sure there are no hidden files or directories inside: ll -a /var/spool/lp/request/printer_name. Sounds like corruption in the pstatus file which is binary and cannot be edited with vi. Hopefully removing the printer_name directory will allow lpadmin -x ro work and pstatus will be cleaned up. Otherwise, you'll need to dump a list of all the printers (lpstat -v for a quick list), then follow the spoolkick procedures to delte and rebuild the spooler.


Bill Hassell, sysadmin
John Destreel
Occasional Advisor

Re: can't remove printer

Thanks Bill,

The spoolkick did the trick!

Cheers,

John
To boldly crash where no one has crashed before : Windows XP