-
×InformationNeed Windows 11 help?Check documents on compatibility, FAQs, upgrade information and available fixes.
Windows 11 Support Center. -
-
×InformationNeed Windows 11 help?Check documents on compatibility, FAQs, upgrade information and available fixes.
Windows 11 Support Center. -
- HP Community
- Printers
- Printer Setup, Software & Drivers
- Re: driverpackageuninstall returned error 5 for package I h...

Create an account on the HP Community to personalize your profile and ask a question
03-03-2020 01:21 PM
Thank you so much I was having the same problem on my HP Officejet 5746 after I unfortunately ran the diagnostic tool :
I tried the spooler trick, tried the set administrator, tried removing it through regedit and finally this worked.
Just when I was giving up hope, I saw this link.
PhilD
03-19-2020 12:10 AM - edited 03-19-2020 12:11 AM
Your solution solved the same problem I had with uninstalling the software for an HP Deskjet Ink Advantage 5275 printer, so many thanks for that. Do you know if this abnormal behaviour is caused by HP software or Windows 10 itself?
03-19-2020 03:29 PM
Hello Shlomil,
i have the same problem but your way doesnt work. Its really frustrating. I have also an HP notebook, so i dont want delete drivers which are not related to the printer/scanner. I am no able to delete the folder "hpwia..." would be great if you could help me
03-19-2020 07:25 PM - edited 03-19-2020 07:26 PM
Hi Maverick,
Shlomil's solution worked for me. Perhaps, these instructions might clarify it for you...maybe you missed a step or two. I think maybe you should give it another try.
Start:
Righ-click on cmd then choose run as Administrator
Step#1; after typing the following command and pressing "enter", this command will give you OWNERSHIP of this directory and all of its sub-directories
takeown /f %windir%\System32\DriverStore\FileRepository /r /d y
Step#2; after typing the following command (substituting %username% with whatever name that's currently logged in (must have admin rights) and pressing "enter", this command will grant you full PERMISSIONS of this directory and all of its sub-directories
icacls "%windir%\System32\DriverStore\FileRepository" /grant %username%:(OI)(CI)F /T
then press enter
Step#3; after typing the following command and pressing "enter", this command will REMOVE this directory and all of its sub-directories that start with hp
for /d %G in ("%windir%\System32\DriverStore\FileRepository\hp*") do rd /s /q "%~G"
then press enter
Note Important:
Step#4 This is where I UNINSTALLED the drivers via Control Panel BEFORE the next step
After uninstalling the drivers via Control Panel (NO MORE ERRORS)
Step#5; after typing the following command and pressing "enter", this command will return OWNERSHIP back to the Administrators Group
takeown /f %windir%\System32\DriverStore\FileRepository /A /r /d y
then press enter
Conclusion: The HP drivers have been uninstalled.
03-20-2020 03:04 AM
@AlexandrosK wrote:Your solution solved the same problem I had with uninstalling the software for an HP Deskjet Ink Advantage 5275 printer, so many thanks for that. Do you know if this abnormal behaviour is caused by HP software or Windows 10 itself?
I would say it is caused due to a Windows Update, not due to the HP software, the software hasn't modified in any way in the same timeframe this problem began occurring, only after specific operating system updates such behavior started to be seen.
Click the Yes button to reply that the response was helpful or to say thanks.
If my post resolve your problem please mark it as an Accepted Solution 🙂
03-20-2020 03:07 AM
Hi,
@Maverick9 wrote:Hello Shlomil,
i have the same problem but your way doesnt work. Its really frustrating. I have also an HP notebook, so i dont want delete drivers which are not related to the printer/scanner. I am no able to delete the folder "hpwia..." would be great if you could help me
Have you run the command to take ownership of the folders first?
Be sure to follow the steps listed on below post, run CMD as an administrator and run the 3 lines of commands into the command prompt admin console:
To make sure you are following the correct post, I refer to the one with the 3 lines of commands below, see the detailed steps listed in the link above:
takeown /f %windir%\System32\DriverStore\FileRepository /r /d y icacls "%windir%\System32\DriverStore\FileRepository" /grant %username%:(OI)(CI)F /T takeown /f %windir%\System32\DriverStore\FileRepository /A /r /d y
Please let me know if that helps @Maverick9
Click the Yes button to reply that the response was helpful or to say thanks.
If my post resolve your problem please mark it as an Accepted Solution 🙂
03-20-2020 03:46 AM
Hello Shlomil,
thank for your answer. Yes i ran these three lines as an admin, but iam not able to delete the folder hpwia....in the file repository folder. The folder hpwia... is not listed as you can see in the pic down below.
Thanks for your help -