Issue

After uninstalling a previously installed version of ecu.test or trace.check, I notice that not all of the disk space is freed up.

Where does your .msi or .exe installer or your product store data?

Solution

Redundant product installers in the Package Cache directories of Windows

During the installation of ecu.test or trace.check a copy of the .msi or .exe setup file is stored in a subfolder of %ProgramData%\Package Cache or %LocalAppData%\Package Cache. Microsoft Windows uses these files to repair, uninstall, modify or reinstall the program.

Thus, it is strongly recommended to keep these files for all versions of ecu.test or trace.check currently installed on the system. Due to a bug these cached installers are not deleted when uninstalling or updating existing products, nor when installing recent product versions.

You can search for files containing ecu.test or trace.check within these folders and delete those that belong to product versions that are currently not installed.

Conveniently, you may automate this error-prone process with the following script.

However, please note that we cannot guarantee or warrant the intended functionality of the script.

Any execution of this open source script is at your own risk.

Preconditions

Script execution

  1. Save the script on your computer, e.g. in %USERPROFILE%\Downloads

  2. Open a command prompt in this location (for instance by typing cmd in the address bar of Windows Explorer)

  3. Execute the script: python CleanUpPackageCacheETTC.py --dry-run

  4. During a dry-run no files will be removed, instead you will obtain output like this:

C:\Users\<USER>\Downloads>python CleanUpPackageCacheETTC.py --dry-run 
Dry run: files are not removed! 
Removed C:\ProgramData\Package Cache\{3747CED2-FC49-59A0-9C84-626A634BBCDD}v2022.4.3.0 [OK] 
Skipped C:\ProgramData\Package Cache\{51898C5F-12DD-5EDA-ADDB-2724696C7B7A}v2023.3.0.0\setup ECU-TEST 2023.3.0-RC.msi 
Removed C:\Users\<USER>\AppData\Local\Package Cache\{66CEA3C0-9CDA-58A0-97F6-8B87D1F96772}v2023.3.0.0 [OK] 
Skipped C:\ProgramData\Package Cache\{E8171865-8903-597F-BE6B-1FCE01624D64}v2023.2.0.0\setup ECU-TEST 2023.2.0-RC.msi 
Skipped C:\ProgramData\Package Cache\{F90C432D-607C-54AB-A08D-F028A2F8132C}v2023.1.4.0\setup ECU-TEST 2023.1.4-RC.msi 
Skipped C:\ProgramData\Package Cache\{8E82C380-88E5-5D0C-BBD6-49146440395A}v2021.3.0.0\setup TRACE-CHECK 2021.3-RC.msi

The lines starting with Removed can safely be deleted as the corresponding versions of ecu.test or trace.check are no longer installed on the system.
The lines starting with Skipped correspond to currently installed versions of ecu.test or trace.check and must remain on the system.

Still missing some megabytes?