[wpkg-users] Q: Is there a way to 'clean up' the WPKG installed packages database?

Adam Thorn alt36 at cam.ac.uk
Tue Apr 19 11:25:05 CEST 2022


On 18/04/2022 22:56, John H Nyhuis wrote:
> Is there a way to clean up the WPKG installed software database (control 
> file)?

The file you want to look at is c:\windows\system32\wpkg.xml . It's an 
xml file containing a list of <package> elements for each piece of 
software that has been installed on a computer via wpkg.

You should probably take a copy of it before experimenting but I think 
you should be able to either:

1. edit the file in a text editor, find the <package> with 
id="NAMEOFPACKAGE", and delete the entire <package> .. </package> 
element, being careful to ensure the file remains valid XML, or ..

2. just delete c:\windows\system32\wpkg.xml . Then run wpkg.js 
/synchronize /dryrun , review the output, then run wpkg.js /synchronize 
. That should just lead to every package in the profile responding with 
the 'Package XYZ: already installed' message and do nothing other than 
recreate the local wpkg.xml file. (This assumes that there are currently 
no pending package changes that you expect /synchronize to perform..!)

Adam


More information about the wpkg-users mailing list