wmic printer get name
printui.exe /dl /n "YOUR-PRINTER-NAME"
from here:
https://www.howtoedge.com/properly-remove-or-uninstall-a-printer-driver-on-windows-10/
4] Uninstall a printer driver through Command Prompt
Many times users find it more cozy to perform a task with the Command-line interface. If you are also one of them and prefer to remove the printer driver using the command, follow the steps –
Click on the Start button and type “cmd”.
Right-click on the “Command prompt” and select Run as administrator.
If UAC prompts on the screen, click on the Yes button.
Once the command prompt opens, type the following command-line and then hit Enter –
wmic printer get name
After that, again type the command and then press the Enter key –
printui.exe /dl /n “YOUR-PRINTER-NAME”
In the above command-line, you need to replace YOUR-PRINTER-NAME with the name of your printer.
Once you complete the above steps, the printer that you specified in the command-line will be uninstalled from your device.
5] Using PowerShell Commands
Sometimes users prefer PowerShell to use the Command-line task. You can use the below steps to uninstall a printer from Windows 10 –
Click on the Start button and type PowerShell.
Right-click on the Windows PowerShell and select Run as administrator.
Click on the Yes button if UAC prompts on the screen.
Once it opens, type the following command and then press the Enter key.
Get-Printer | Format-List Name
Again, type the below command and press Enter to uninstall the Printer.
Remove-Printer -Name "YOUR-PRINTER-NAME"
This will remove the printer from your device. In the above command line, you need to replace YOUR-PRINTER-NAME with the name of your Printer.