-
×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
04-03-2020 12:35 PM
Thanks for the information @49Andy.
As the uninstall process was done and you are now facing a different error, please create a new topic to keep this one on this topic, for other users experiencing the same.
Please include What exact error message you refer to as a Driver error or a connection error can indicate different issues, if you may include a screenshot it would be great.
Be sure to the me in the new post using the @ sign in the post, as well clarify if the printer is connected wirelessly or in any other connection...
Cheers,
Shlomi
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 🙂
04-06-2020 04:59 PM - edited 04-06-2020 05:05 PM
Hi @ShlomiL,
I have the same issue, I think. When I try to uninstall my printer, it tells me:
Call to DriverPackageInstall returned error 5 for package 'C:\WiNDOWS\System32\DriverStore\FileRepository\(crazy looking gibberish filename).inf' A caller of DriverPackageInstall must be a member of the Administrators group to install a driver package.
I am an administrator on this computer if that's what it means. My printer is an HP color laserjet pro mfp m281cdw. Will this same solution work for me as well?
thank you for your help!
04-06-2020 10:14 PM
Yes @LS367, it should likely help.
Generally, below Reply should help when you only have an HP printer:
If you may experience the issue on an HP computer, see below reply:
Shlomi
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 🙂
04-07-2020 10:43 PM
@inktech_P
Hi inktech_P,
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.
If you're still having problems, maybe we can pinpoint the issue.
Let me know which step you're having problems with?
Let me know how it turns out.
04-08-2020 11:57 AM
Hi ShlomiL ,
im so sorry for my bad engl im italian so...
, i have sawn that you solved the error 5 for the hp product ( yesterday i have done the windows 10 pro update and now those two hp products dosent work on lan connection) ,i have the same problem with my Officejet Pro 8600 and my Desingjet T520 i really will love you if you can help me with this problem becuse i saw that if the hp product is different you need a diffirent command on the cmd to solve the problem becuse if i try with those codes (even running with administrator) my cmd told me for 4 process the command works fine but the last process tells me access denied (italian word for access denided is accesso negato as the cmd shows) .
If you can help me to solve it you will be my hero too ❤️
04-08-2020 01:16 PM
Hi, I have the same issue. When I was traying to delete my HP Ink Tank 315 basic software it appears driverpackageuninstall returned error 5 for package. I own a HP Pavilion Laptop 15-cw1xxx and the reason why I was triying to delete the printer's software is because it keeps printing the documents just for some parts of it and not complete. Also always appears: Misprint of the document and then continues traying to print the same document again.
It would be great if you could help me. I'll be waiting for your replay.
04-08-2020 01:23 PM
Hi @Mangageom,
From reviewing Microsoft documentation for the Takeown command for Italian, it seems to me as the same prefix should be used for Italian too as much as I can understand, although I cannot be sure due to not being familiar with the Italian language.
Please review Microsoft's documentation below and see if any value may be used differently for the Italian locale when using the Takeown command:
https://docs.microsoft.com/it-it/windows-server/administration/windows-commands/takeown
May you see any difference when using a capital Y with the command as below command? it might be more crucial for the locale, but this is basically just a guess.
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
Hope that helps,
Shlomi
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 🙂
04-08-2020 01:26 PM
@AlejoSoto wrote:Hi, I have the same issue. When I was traying to delete my HP Ink Tank 315 basic software it appears driverpackageuninstall returned error 5 for package. I own a HP Pavilion Laptop 15-cw1xxx and the reason why I was triying to delete the printer's software is because it keeps printing the documents just for some parts of it and not complete. Also always appears: Misprint of the document and then continues traying to print the same document again.
It would be great if you could help me. I'll be waiting for your replay.
Prior to uninstalling the software, could you please print a Printer Status Report first @AlejoSoto?
I would not be surprised if the problem is not related to the software at all for my experience, can you see a Printer Status Report printed as the shown example or may you see any difference there?
Additionally, is the printer connected wirelessly or with a USB?
Shlomi
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 🙂