It tried to remove 2 printers from CUPS on my laptop with Ubuntu 22.04. I managed to remove one of two printers (via http://localhost:631/printers/). The other printer I try to remove via http://localhost:631/printers/, can not deleted. What am I doing wrong? Is there something corrupt on my system?
Asked
Active
Viewed 5,914 times
1 Answers
2
Always make sure cups is stopped when you alter printers. Maybe that is your issue but it will be difficult to tell you what is wrong with only this information.
However you can do this from your Linux system. Stop cups and make a backup of printers.conf.
sudo service cups stop
cd /etc/cups/
sudo cp printers.conf printers.confOLD
To list all printers do:
lpstat -v
and using the listed printer ID this will remove a printer (change it for your printer ID):
sudo lpadmin -x {printerID}
Then start cups again with:
sudo service cups start
Rinzwind
- 310,127
-
my printers.conf was not in /var/cups but in /etc/cups – user2588998 Aug 21 '22 at 13:19
-
sorry my bad :D – Rinzwind Aug 21 '22 at 13:22
-
2I did a lpstat -v before "sudo service cups stop" which listed my printers. After I stopped the service and copied printers.conf, I could not remove the printer with "sudo lpadmin -x
. But when I started the service again and listed with 'lpstat -v" the printer I wanted to remove was gone. Probably there was someting corrupt on my system and the removal was already initiated by my attempt via CUPS GUI in the browser. Anyway problem solved. Thank you! – user2588998 Aug 21 '22 at 13:26 -
@user2588998 glad you got it sorted. Only issue I tend to have with cups is when I forget to stop it. – Rinzwind Aug 21 '22 at 13:31
-
1I wouldn't be surprised if the printer reappeared after a reboot. – brian_p Aug 21 '22 at 14:10