How can I eliminate the huge, cached MSI files in C:WindowsInstaller?The corporate benefits of using MSI...

How to approximate rolls for potions of healing using only d6's?

How can I handle a player who pre-plans arguments about my rulings on RAW?

The change directory (cd) command is not working with a USB drive

Sometimes a banana is just a banana

Replacement ford fiesta radiator has extra hose

Does music exist in Panem? And if so, what kinds of music?

Did 5.25" floppies undergo a change in magnetic coating?

How would we write a misogynistic character without offending people?

Where is the fallacy here?

I am on the US no-fly list. What can I do in order to be allowed on flights which go through US airspace?

Hacker Rank: Array left rotation

What can I substitute for soda pop in a sweet pork recipe?

As a new poet, where can I find help from a professional to judge my work?

Pronunciation of powers

Avoiding unpacking an array when altering its dimension

What's the difference between a cart and a wagon?

What's the purpose of these copper coils with resistors inside them in A Yamaha RX-V396RDS amplifier?

Where is this triangular-shaped space station from?

Which aircraft had such a luxurious-looking navigator's station?

When should a commit not be version tagged?

What is a term for a function that when called repeatedly, has the same effect as calling once?

Do authors have to be politically correct in article-writing?

Six real numbers so that product of any five is the sixth one

Where was Karl Mordo in Infinity War?



How can I eliminate the huge, cached MSI files in C:WindowsInstaller?


The corporate benefits of using MSI filesHow can I speed up MSI package install and uninstall?The corporate benefits of using MSI filesHow do I remove Windows Update uninstall files on Windows Server 2008?Windows Installer cannot execute EXE install filesDeploying .msi application through GPO doesn't workdetermining disk space usage on plesk domainAfter MSI install, WindowsInstaller DB file name changesHow can I speed up MSI package install and uninstall?Server 2012 R2 System Disk FillingDisk cache impaction on linux df resultHow can I compare the content of two (or more) MSI files?













5















The size of the MSI cache folder (C:WindowsInstaller) has grown substantially, and is now taking up way too much disk space on my (domain) computers. Can this folder be eliminated or shrunk?



Same question goes for:





  • C:WINDOWSWinSxS (%SystemRoot%WinSxS)


  • C:System32DriverStore (%SystemRoot%System32DriverStore)










share|improve this question





























    5















    The size of the MSI cache folder (C:WindowsInstaller) has grown substantially, and is now taking up way too much disk space on my (domain) computers. Can this folder be eliminated or shrunk?



    Same question goes for:





    • C:WINDOWSWinSxS (%SystemRoot%WinSxS)


    • C:System32DriverStore (%SystemRoot%System32DriverStore)










    share|improve this question



























      5












      5








      5


      1






      The size of the MSI cache folder (C:WindowsInstaller) has grown substantially, and is now taking up way too much disk space on my (domain) computers. Can this folder be eliminated or shrunk?



      Same question goes for:





      • C:WINDOWSWinSxS (%SystemRoot%WinSxS)


      • C:System32DriverStore (%SystemRoot%System32DriverStore)










      share|improve this question
















      The size of the MSI cache folder (C:WindowsInstaller) has grown substantially, and is now taking up way too much disk space on my (domain) computers. Can this folder be eliminated or shrunk?



      Same question goes for:





      • C:WINDOWSWinSxS (%SystemRoot%WinSxS)


      • C:System32DriverStore (%SystemRoot%System32DriverStore)







      installation disk-space-utilization msi uninstall windows-installer






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Sep 25 '18 at 18:06







      Stein Åsmul

















      asked Nov 5 '14 at 11:56









      Stein ÅsmulStein Åsmul

      2,19121933




      2,19121933






















          1 Answer
          1






          active

          oldest

          votes


















          8














          Summary




          The directory %SystemRoot%Installer and its contents must never be meddled with. An unserviceable system almost always results. Same goes for WinSxS, Driver Store & GAC.



          The real issue is disc space - SSD drives are still too small for comfort. Below are some suggested procedures you can use to regain
          space in a safer way.



          Using administrative installations is a general purpose measure to
          reduce the size of the %SystemRoot%Installer folder for future deployments. See bottom section.






          Original & Long Answer




          Below are the essential / most effective options summarized from this
          original and messy answer: Trifles & Tricks: Obvious ways to free
          up disc space on your system
          drive
          (long).







          Express: Urgent 5-Minute Space Reclamation





          1. Storage: Insert a USB drive (low-profile if you want it connected permanently) or SD-card. Move the content of your Downloads and Largest Media folders on there. Use USB 3.X port! (blue / red / teal).


          2. Mongers Sweep: In Windows Explorer, select "Users folder" (C:Users), press F3 and select "Size: Gigantic" (or very large). Move them away if found - with caution:


            • Typically ISOs, Virtuals, Movie files, etc...

            • Careful with: Outlook PST files! Database files!

            • Avoid source code folders and virtual disks (move whole folder only)!




          3. Zap Re-downloadable Files?



            • iTunes?, ISOs?


            • Zap clouded files? (local cache)






          Many further options below. Just the 5-minute emergency procedure I use myself (trivial options).



          And obviously empty the recycle bin :-). Also quick to uninstall large, unused software packages.



          And check root of C: for virtuals and similar uses. Most large files should be in profile hierarchy though.





          Reclaim Disc Space - The Pragmatic Options



          Recommended real-world quick-options for disc space reclamation:



          Low-profile USB & SD Card





          • General: Removables & Disc Space Visualization.




            • Add a low-profile USB drive and / or SD-Card to your laptop for "permanent", extra storage to move large files to. Generally not high-speed, use accordingly. Note! I find low-profile USB drives may run a bit hot under load. Not for heavy, continuous use IMHO.


            • Find Space Hogs: https://en.wikipedia.org/wiki/WinDirStat. Visualization tool for disc space consumption. May run slowly on non-SSD disks. Shows what eats your disc.



          • Option 0: Clouding. Obviously. OneDrive, Dropbox, Google Drive, etc...



          • Option 2: Microsoft's Disk Cleanup Tool. Purge Windows Update files & more.



            • Windows Key + Tap R, type cleanmgr.exe and press Enter.

            • Select system drive and press OK

            • Now click Clean up System Files then select system drive and press OK.







          • UPDATE Oct.2018: In their infinite wisdom Microsoft has added the "Downloads" folder as a cleanup option! This is pure lunacy, DO
            NOT ENABLE!
            It deletes the whole downloads folder without question.






          • Option 7: Clean out Downloads folder (all users).


            • Move files to USB / SD / other partition.

            • Change default Downloads location: Right Click Folder => Properties => Location.

            • One shared location for all users - if applicable?




          • Option 18: Compression (selective folders?). In Folder Properties. May be ultra slow for old disks.


          • Option 19: Uninstall unnecessary software. Run appwiz.cpl from Windows Key + Tap R


          High risk option: Delete outdated and obsolete recovery partition(s) and create a usable partition in its place to keep data on.




          • Very effective when combined with options 1 (My Documents) & 7 (Downloads) & 11 (Data Heavy Applications), etc... Can end in disaster if wrong partition is deleted - of course.


          • To succeed deleting recovery partitions either diskpart (Windows) or gparted (Linux) is likely needed (see "Alternative Approaches" in linked SO answer). Not for the faint of heart or inexperienced. Backup is essential!



          Runners-Up: Option 4: Administrative Installation is presented below. Maybe also check Option 3: (CCleaner) (not without risk). And a final mention: you can turn off system restore as well (particularly for virtuals). Not listed in linked answer (max lenght).





          Scavenging / Putting WinSxS on a Diet



          The WinSxS folder - Win32 side-by-side assembly store is full of hard links (several shortcuts to the same "physical" file) and often obsolete versions that can never be used (superseded by policy and updates). You can run "Scavenging" - garbage collection for side-by-side Win32 assemblies.



          "Find actual size" command that is available since Win 8.1 (from elevated command prompt):



          Dism.exe /Online /Cleanup-Image /AnalyzeComponentStore  


          This goes beyond all the hard links in there and finds the actual size of the WinSxS folder - and whether it should be cleaned up.



          Run "Scavenging" (from elevated command prompt):



           Dism.exe /online /Cleanup-Image /StartComponentCleanup


          Microsoft's Disk Cleanup Tool: cleanmgr.exe seems to kick off "scavenging" sometimes. And there is a scheduled task (Win8 up) - kicking off cleanup. Slightly different from running the command. 30 days grace period before purging, and some timeout issues (ends after 1 hour, regardless).





          Superuser: Why does the /winsxs folder grow so large, and can it be made smaller?





          Administrative Installation



          You can't safely delete these files, they are there to facilitate uninstall, modify and repair operations for the installed product. You can, however, greatly reduce the size of the cached MSI files by running an administrative installation (essentially a file extraction) of the MSI before installing it. Follow link above for description - you should put these extracted files on a network share.



          The cached MSI files used to be small because they were stripped of their internal CAB files. However, starting with Windows 7 (MSI version 5) the MSI files are now cached full size to avoid breaking the file signature that affects the UAC prompt on setup launch (a known Vista problem). This may cause a tremendous increase in disk space consumption (several gigabytes for some systems).



          Running admin install will extract the files from the CAB files embedded in the MSI, adjust the media layout in the Media table in the new MSI so that running it will use the extracted, external source files instead of internal CABs. The new and smaller MSI file used for installation is then cached on the system. This can save several gigabytes of disk space, depending on what installers you use, how many you have to install, how big they are, etc... Keep in mind that you must deal with the UAC prompt issue described above when using admin images since the extracted MSI is (normally) no longer signed, but from a reputable source (your own extraction).



          The extracted files and the associated MSI file should be put on a network installation point along with all other installers to ensure files are available for repair operations. This is how most large corporations deal with installation anyway. Then there is no need for embedded CAB files in the cached MSI at all. SCCM and other deployment systems may also have other ways to ensure files are available for repair operations.



          Some further links:




          • Admin install, the built-in MSI support for file extraction

          • Purpose of Administrative Installs

          • How to speed up MSI installations

          • Why does MSI require the original .msi file to proceed with an uninstall?

          • The corporate benefits of using MSI files






          share|improve this answer





















          • 2





            "You can't delete these files" -> You shouldn't delete these files, because doing so break stuff.

            – Chris S
            Nov 5 '14 at 16:31






          • 1





            Yes, deleting the files will cause the package to be uninstallable unless you have access to and can run the original installation media. Several other, serious problems will also surface with regards to patching, upgrades, repair, self-repair, etc... These are core OS resource files and must be left alone.

            – Stein Åsmul
            Nov 5 '14 at 16:33













          • At work, we've had a few Win10 PCs that have started to fill up their C: drive due to the remains of repeatedly failing Windows updates piling up in the C:WindowsInstaller folder. I've fixed these by using the Media Creation Tool to create Win10 media on a USB stick, which I then used to do an 'upgrade' install of Win10 over top of the existing Win10 install. Works perfectly, unless you don't have enough space on C: to do an 'upgrade' install, in which case you need to do some other cleanup first.

            – 3D1T0R
            Sep 25 '18 at 21:03











          • Would be interesting to know if the cleanmgr.exe (Microsoft Disk Cleanup Tool) would be able to clean that? It might not do so until after 30 days or something like that? I am not sure. The internal details of this tool remains mysterious, but it does a lot of things "under the hood". Seemingly different actions from time to time as well.

            – Stein Åsmul
            Sep 25 '18 at 21:06













          • cleanmgr.exe is always the first thing I do before I start digging into the rest of 'my space recovery tool kit'. In my experience, it's never done anything to help with cleaning up C:WindowsInstaller.

            – 3D1T0R
            Sep 26 '18 at 0:28











          Your Answer








          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "2"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fserverfault.com%2fquestions%2f642177%2fhow-can-i-eliminate-the-huge-cached-msi-files-in-c-windows-installer%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          8














          Summary




          The directory %SystemRoot%Installer and its contents must never be meddled with. An unserviceable system almost always results. Same goes for WinSxS, Driver Store & GAC.



          The real issue is disc space - SSD drives are still too small for comfort. Below are some suggested procedures you can use to regain
          space in a safer way.



          Using administrative installations is a general purpose measure to
          reduce the size of the %SystemRoot%Installer folder for future deployments. See bottom section.






          Original & Long Answer




          Below are the essential / most effective options summarized from this
          original and messy answer: Trifles & Tricks: Obvious ways to free
          up disc space on your system
          drive
          (long).







          Express: Urgent 5-Minute Space Reclamation





          1. Storage: Insert a USB drive (low-profile if you want it connected permanently) or SD-card. Move the content of your Downloads and Largest Media folders on there. Use USB 3.X port! (blue / red / teal).


          2. Mongers Sweep: In Windows Explorer, select "Users folder" (C:Users), press F3 and select "Size: Gigantic" (or very large). Move them away if found - with caution:


            • Typically ISOs, Virtuals, Movie files, etc...

            • Careful with: Outlook PST files! Database files!

            • Avoid source code folders and virtual disks (move whole folder only)!




          3. Zap Re-downloadable Files?



            • iTunes?, ISOs?


            • Zap clouded files? (local cache)






          Many further options below. Just the 5-minute emergency procedure I use myself (trivial options).



          And obviously empty the recycle bin :-). Also quick to uninstall large, unused software packages.



          And check root of C: for virtuals and similar uses. Most large files should be in profile hierarchy though.





          Reclaim Disc Space - The Pragmatic Options



          Recommended real-world quick-options for disc space reclamation:



          Low-profile USB & SD Card





          • General: Removables & Disc Space Visualization.




            • Add a low-profile USB drive and / or SD-Card to your laptop for "permanent", extra storage to move large files to. Generally not high-speed, use accordingly. Note! I find low-profile USB drives may run a bit hot under load. Not for heavy, continuous use IMHO.


            • Find Space Hogs: https://en.wikipedia.org/wiki/WinDirStat. Visualization tool for disc space consumption. May run slowly on non-SSD disks. Shows what eats your disc.



          • Option 0: Clouding. Obviously. OneDrive, Dropbox, Google Drive, etc...



          • Option 2: Microsoft's Disk Cleanup Tool. Purge Windows Update files & more.



            • Windows Key + Tap R, type cleanmgr.exe and press Enter.

            • Select system drive and press OK

            • Now click Clean up System Files then select system drive and press OK.







          • UPDATE Oct.2018: In their infinite wisdom Microsoft has added the "Downloads" folder as a cleanup option! This is pure lunacy, DO
            NOT ENABLE!
            It deletes the whole downloads folder without question.






          • Option 7: Clean out Downloads folder (all users).


            • Move files to USB / SD / other partition.

            • Change default Downloads location: Right Click Folder => Properties => Location.

            • One shared location for all users - if applicable?




          • Option 18: Compression (selective folders?). In Folder Properties. May be ultra slow for old disks.


          • Option 19: Uninstall unnecessary software. Run appwiz.cpl from Windows Key + Tap R


          High risk option: Delete outdated and obsolete recovery partition(s) and create a usable partition in its place to keep data on.




          • Very effective when combined with options 1 (My Documents) & 7 (Downloads) & 11 (Data Heavy Applications), etc... Can end in disaster if wrong partition is deleted - of course.


          • To succeed deleting recovery partitions either diskpart (Windows) or gparted (Linux) is likely needed (see "Alternative Approaches" in linked SO answer). Not for the faint of heart or inexperienced. Backup is essential!



          Runners-Up: Option 4: Administrative Installation is presented below. Maybe also check Option 3: (CCleaner) (not without risk). And a final mention: you can turn off system restore as well (particularly for virtuals). Not listed in linked answer (max lenght).





          Scavenging / Putting WinSxS on a Diet



          The WinSxS folder - Win32 side-by-side assembly store is full of hard links (several shortcuts to the same "physical" file) and often obsolete versions that can never be used (superseded by policy and updates). You can run "Scavenging" - garbage collection for side-by-side Win32 assemblies.



          "Find actual size" command that is available since Win 8.1 (from elevated command prompt):



          Dism.exe /Online /Cleanup-Image /AnalyzeComponentStore  


          This goes beyond all the hard links in there and finds the actual size of the WinSxS folder - and whether it should be cleaned up.



          Run "Scavenging" (from elevated command prompt):



           Dism.exe /online /Cleanup-Image /StartComponentCleanup


          Microsoft's Disk Cleanup Tool: cleanmgr.exe seems to kick off "scavenging" sometimes. And there is a scheduled task (Win8 up) - kicking off cleanup. Slightly different from running the command. 30 days grace period before purging, and some timeout issues (ends after 1 hour, regardless).





          Superuser: Why does the /winsxs folder grow so large, and can it be made smaller?





          Administrative Installation



          You can't safely delete these files, they are there to facilitate uninstall, modify and repair operations for the installed product. You can, however, greatly reduce the size of the cached MSI files by running an administrative installation (essentially a file extraction) of the MSI before installing it. Follow link above for description - you should put these extracted files on a network share.



          The cached MSI files used to be small because they were stripped of their internal CAB files. However, starting with Windows 7 (MSI version 5) the MSI files are now cached full size to avoid breaking the file signature that affects the UAC prompt on setup launch (a known Vista problem). This may cause a tremendous increase in disk space consumption (several gigabytes for some systems).



          Running admin install will extract the files from the CAB files embedded in the MSI, adjust the media layout in the Media table in the new MSI so that running it will use the extracted, external source files instead of internal CABs. The new and smaller MSI file used for installation is then cached on the system. This can save several gigabytes of disk space, depending on what installers you use, how many you have to install, how big they are, etc... Keep in mind that you must deal with the UAC prompt issue described above when using admin images since the extracted MSI is (normally) no longer signed, but from a reputable source (your own extraction).



          The extracted files and the associated MSI file should be put on a network installation point along with all other installers to ensure files are available for repair operations. This is how most large corporations deal with installation anyway. Then there is no need for embedded CAB files in the cached MSI at all. SCCM and other deployment systems may also have other ways to ensure files are available for repair operations.



          Some further links:




          • Admin install, the built-in MSI support for file extraction

          • Purpose of Administrative Installs

          • How to speed up MSI installations

          • Why does MSI require the original .msi file to proceed with an uninstall?

          • The corporate benefits of using MSI files






          share|improve this answer





















          • 2





            "You can't delete these files" -> You shouldn't delete these files, because doing so break stuff.

            – Chris S
            Nov 5 '14 at 16:31






          • 1





            Yes, deleting the files will cause the package to be uninstallable unless you have access to and can run the original installation media. Several other, serious problems will also surface with regards to patching, upgrades, repair, self-repair, etc... These are core OS resource files and must be left alone.

            – Stein Åsmul
            Nov 5 '14 at 16:33













          • At work, we've had a few Win10 PCs that have started to fill up their C: drive due to the remains of repeatedly failing Windows updates piling up in the C:WindowsInstaller folder. I've fixed these by using the Media Creation Tool to create Win10 media on a USB stick, which I then used to do an 'upgrade' install of Win10 over top of the existing Win10 install. Works perfectly, unless you don't have enough space on C: to do an 'upgrade' install, in which case you need to do some other cleanup first.

            – 3D1T0R
            Sep 25 '18 at 21:03











          • Would be interesting to know if the cleanmgr.exe (Microsoft Disk Cleanup Tool) would be able to clean that? It might not do so until after 30 days or something like that? I am not sure. The internal details of this tool remains mysterious, but it does a lot of things "under the hood". Seemingly different actions from time to time as well.

            – Stein Åsmul
            Sep 25 '18 at 21:06













          • cleanmgr.exe is always the first thing I do before I start digging into the rest of 'my space recovery tool kit'. In my experience, it's never done anything to help with cleaning up C:WindowsInstaller.

            – 3D1T0R
            Sep 26 '18 at 0:28
















          8














          Summary




          The directory %SystemRoot%Installer and its contents must never be meddled with. An unserviceable system almost always results. Same goes for WinSxS, Driver Store & GAC.



          The real issue is disc space - SSD drives are still too small for comfort. Below are some suggested procedures you can use to regain
          space in a safer way.



          Using administrative installations is a general purpose measure to
          reduce the size of the %SystemRoot%Installer folder for future deployments. See bottom section.






          Original & Long Answer




          Below are the essential / most effective options summarized from this
          original and messy answer: Trifles & Tricks: Obvious ways to free
          up disc space on your system
          drive
          (long).







          Express: Urgent 5-Minute Space Reclamation





          1. Storage: Insert a USB drive (low-profile if you want it connected permanently) or SD-card. Move the content of your Downloads and Largest Media folders on there. Use USB 3.X port! (blue / red / teal).


          2. Mongers Sweep: In Windows Explorer, select "Users folder" (C:Users), press F3 and select "Size: Gigantic" (or very large). Move them away if found - with caution:


            • Typically ISOs, Virtuals, Movie files, etc...

            • Careful with: Outlook PST files! Database files!

            • Avoid source code folders and virtual disks (move whole folder only)!




          3. Zap Re-downloadable Files?



            • iTunes?, ISOs?


            • Zap clouded files? (local cache)






          Many further options below. Just the 5-minute emergency procedure I use myself (trivial options).



          And obviously empty the recycle bin :-). Also quick to uninstall large, unused software packages.



          And check root of C: for virtuals and similar uses. Most large files should be in profile hierarchy though.





          Reclaim Disc Space - The Pragmatic Options



          Recommended real-world quick-options for disc space reclamation:



          Low-profile USB & SD Card





          • General: Removables & Disc Space Visualization.




            • Add a low-profile USB drive and / or SD-Card to your laptop for "permanent", extra storage to move large files to. Generally not high-speed, use accordingly. Note! I find low-profile USB drives may run a bit hot under load. Not for heavy, continuous use IMHO.


            • Find Space Hogs: https://en.wikipedia.org/wiki/WinDirStat. Visualization tool for disc space consumption. May run slowly on non-SSD disks. Shows what eats your disc.



          • Option 0: Clouding. Obviously. OneDrive, Dropbox, Google Drive, etc...



          • Option 2: Microsoft's Disk Cleanup Tool. Purge Windows Update files & more.



            • Windows Key + Tap R, type cleanmgr.exe and press Enter.

            • Select system drive and press OK

            • Now click Clean up System Files then select system drive and press OK.







          • UPDATE Oct.2018: In their infinite wisdom Microsoft has added the "Downloads" folder as a cleanup option! This is pure lunacy, DO
            NOT ENABLE!
            It deletes the whole downloads folder without question.






          • Option 7: Clean out Downloads folder (all users).


            • Move files to USB / SD / other partition.

            • Change default Downloads location: Right Click Folder => Properties => Location.

            • One shared location for all users - if applicable?




          • Option 18: Compression (selective folders?). In Folder Properties. May be ultra slow for old disks.


          • Option 19: Uninstall unnecessary software. Run appwiz.cpl from Windows Key + Tap R


          High risk option: Delete outdated and obsolete recovery partition(s) and create a usable partition in its place to keep data on.




          • Very effective when combined with options 1 (My Documents) & 7 (Downloads) & 11 (Data Heavy Applications), etc... Can end in disaster if wrong partition is deleted - of course.


          • To succeed deleting recovery partitions either diskpart (Windows) or gparted (Linux) is likely needed (see "Alternative Approaches" in linked SO answer). Not for the faint of heart or inexperienced. Backup is essential!



          Runners-Up: Option 4: Administrative Installation is presented below. Maybe also check Option 3: (CCleaner) (not without risk). And a final mention: you can turn off system restore as well (particularly for virtuals). Not listed in linked answer (max lenght).





          Scavenging / Putting WinSxS on a Diet



          The WinSxS folder - Win32 side-by-side assembly store is full of hard links (several shortcuts to the same "physical" file) and often obsolete versions that can never be used (superseded by policy and updates). You can run "Scavenging" - garbage collection for side-by-side Win32 assemblies.



          "Find actual size" command that is available since Win 8.1 (from elevated command prompt):



          Dism.exe /Online /Cleanup-Image /AnalyzeComponentStore  


          This goes beyond all the hard links in there and finds the actual size of the WinSxS folder - and whether it should be cleaned up.



          Run "Scavenging" (from elevated command prompt):



           Dism.exe /online /Cleanup-Image /StartComponentCleanup


          Microsoft's Disk Cleanup Tool: cleanmgr.exe seems to kick off "scavenging" sometimes. And there is a scheduled task (Win8 up) - kicking off cleanup. Slightly different from running the command. 30 days grace period before purging, and some timeout issues (ends after 1 hour, regardless).





          Superuser: Why does the /winsxs folder grow so large, and can it be made smaller?





          Administrative Installation



          You can't safely delete these files, they are there to facilitate uninstall, modify and repair operations for the installed product. You can, however, greatly reduce the size of the cached MSI files by running an administrative installation (essentially a file extraction) of the MSI before installing it. Follow link above for description - you should put these extracted files on a network share.



          The cached MSI files used to be small because they were stripped of their internal CAB files. However, starting with Windows 7 (MSI version 5) the MSI files are now cached full size to avoid breaking the file signature that affects the UAC prompt on setup launch (a known Vista problem). This may cause a tremendous increase in disk space consumption (several gigabytes for some systems).



          Running admin install will extract the files from the CAB files embedded in the MSI, adjust the media layout in the Media table in the new MSI so that running it will use the extracted, external source files instead of internal CABs. The new and smaller MSI file used for installation is then cached on the system. This can save several gigabytes of disk space, depending on what installers you use, how many you have to install, how big they are, etc... Keep in mind that you must deal with the UAC prompt issue described above when using admin images since the extracted MSI is (normally) no longer signed, but from a reputable source (your own extraction).



          The extracted files and the associated MSI file should be put on a network installation point along with all other installers to ensure files are available for repair operations. This is how most large corporations deal with installation anyway. Then there is no need for embedded CAB files in the cached MSI at all. SCCM and other deployment systems may also have other ways to ensure files are available for repair operations.



          Some further links:




          • Admin install, the built-in MSI support for file extraction

          • Purpose of Administrative Installs

          • How to speed up MSI installations

          • Why does MSI require the original .msi file to proceed with an uninstall?

          • The corporate benefits of using MSI files






          share|improve this answer





















          • 2





            "You can't delete these files" -> You shouldn't delete these files, because doing so break stuff.

            – Chris S
            Nov 5 '14 at 16:31






          • 1





            Yes, deleting the files will cause the package to be uninstallable unless you have access to and can run the original installation media. Several other, serious problems will also surface with regards to patching, upgrades, repair, self-repair, etc... These are core OS resource files and must be left alone.

            – Stein Åsmul
            Nov 5 '14 at 16:33













          • At work, we've had a few Win10 PCs that have started to fill up their C: drive due to the remains of repeatedly failing Windows updates piling up in the C:WindowsInstaller folder. I've fixed these by using the Media Creation Tool to create Win10 media on a USB stick, which I then used to do an 'upgrade' install of Win10 over top of the existing Win10 install. Works perfectly, unless you don't have enough space on C: to do an 'upgrade' install, in which case you need to do some other cleanup first.

            – 3D1T0R
            Sep 25 '18 at 21:03











          • Would be interesting to know if the cleanmgr.exe (Microsoft Disk Cleanup Tool) would be able to clean that? It might not do so until after 30 days or something like that? I am not sure. The internal details of this tool remains mysterious, but it does a lot of things "under the hood". Seemingly different actions from time to time as well.

            – Stein Åsmul
            Sep 25 '18 at 21:06













          • cleanmgr.exe is always the first thing I do before I start digging into the rest of 'my space recovery tool kit'. In my experience, it's never done anything to help with cleaning up C:WindowsInstaller.

            – 3D1T0R
            Sep 26 '18 at 0:28














          8












          8








          8







          Summary




          The directory %SystemRoot%Installer and its contents must never be meddled with. An unserviceable system almost always results. Same goes for WinSxS, Driver Store & GAC.



          The real issue is disc space - SSD drives are still too small for comfort. Below are some suggested procedures you can use to regain
          space in a safer way.



          Using administrative installations is a general purpose measure to
          reduce the size of the %SystemRoot%Installer folder for future deployments. See bottom section.






          Original & Long Answer




          Below are the essential / most effective options summarized from this
          original and messy answer: Trifles & Tricks: Obvious ways to free
          up disc space on your system
          drive
          (long).







          Express: Urgent 5-Minute Space Reclamation





          1. Storage: Insert a USB drive (low-profile if you want it connected permanently) or SD-card. Move the content of your Downloads and Largest Media folders on there. Use USB 3.X port! (blue / red / teal).


          2. Mongers Sweep: In Windows Explorer, select "Users folder" (C:Users), press F3 and select "Size: Gigantic" (or very large). Move them away if found - with caution:


            • Typically ISOs, Virtuals, Movie files, etc...

            • Careful with: Outlook PST files! Database files!

            • Avoid source code folders and virtual disks (move whole folder only)!




          3. Zap Re-downloadable Files?



            • iTunes?, ISOs?


            • Zap clouded files? (local cache)






          Many further options below. Just the 5-minute emergency procedure I use myself (trivial options).



          And obviously empty the recycle bin :-). Also quick to uninstall large, unused software packages.



          And check root of C: for virtuals and similar uses. Most large files should be in profile hierarchy though.





          Reclaim Disc Space - The Pragmatic Options



          Recommended real-world quick-options for disc space reclamation:



          Low-profile USB & SD Card





          • General: Removables & Disc Space Visualization.




            • Add a low-profile USB drive and / or SD-Card to your laptop for "permanent", extra storage to move large files to. Generally not high-speed, use accordingly. Note! I find low-profile USB drives may run a bit hot under load. Not for heavy, continuous use IMHO.


            • Find Space Hogs: https://en.wikipedia.org/wiki/WinDirStat. Visualization tool for disc space consumption. May run slowly on non-SSD disks. Shows what eats your disc.



          • Option 0: Clouding. Obviously. OneDrive, Dropbox, Google Drive, etc...



          • Option 2: Microsoft's Disk Cleanup Tool. Purge Windows Update files & more.



            • Windows Key + Tap R, type cleanmgr.exe and press Enter.

            • Select system drive and press OK

            • Now click Clean up System Files then select system drive and press OK.







          • UPDATE Oct.2018: In their infinite wisdom Microsoft has added the "Downloads" folder as a cleanup option! This is pure lunacy, DO
            NOT ENABLE!
            It deletes the whole downloads folder without question.






          • Option 7: Clean out Downloads folder (all users).


            • Move files to USB / SD / other partition.

            • Change default Downloads location: Right Click Folder => Properties => Location.

            • One shared location for all users - if applicable?




          • Option 18: Compression (selective folders?). In Folder Properties. May be ultra slow for old disks.


          • Option 19: Uninstall unnecessary software. Run appwiz.cpl from Windows Key + Tap R


          High risk option: Delete outdated and obsolete recovery partition(s) and create a usable partition in its place to keep data on.




          • Very effective when combined with options 1 (My Documents) & 7 (Downloads) & 11 (Data Heavy Applications), etc... Can end in disaster if wrong partition is deleted - of course.


          • To succeed deleting recovery partitions either diskpart (Windows) or gparted (Linux) is likely needed (see "Alternative Approaches" in linked SO answer). Not for the faint of heart or inexperienced. Backup is essential!



          Runners-Up: Option 4: Administrative Installation is presented below. Maybe also check Option 3: (CCleaner) (not without risk). And a final mention: you can turn off system restore as well (particularly for virtuals). Not listed in linked answer (max lenght).





          Scavenging / Putting WinSxS on a Diet



          The WinSxS folder - Win32 side-by-side assembly store is full of hard links (several shortcuts to the same "physical" file) and often obsolete versions that can never be used (superseded by policy and updates). You can run "Scavenging" - garbage collection for side-by-side Win32 assemblies.



          "Find actual size" command that is available since Win 8.1 (from elevated command prompt):



          Dism.exe /Online /Cleanup-Image /AnalyzeComponentStore  


          This goes beyond all the hard links in there and finds the actual size of the WinSxS folder - and whether it should be cleaned up.



          Run "Scavenging" (from elevated command prompt):



           Dism.exe /online /Cleanup-Image /StartComponentCleanup


          Microsoft's Disk Cleanup Tool: cleanmgr.exe seems to kick off "scavenging" sometimes. And there is a scheduled task (Win8 up) - kicking off cleanup. Slightly different from running the command. 30 days grace period before purging, and some timeout issues (ends after 1 hour, regardless).





          Superuser: Why does the /winsxs folder grow so large, and can it be made smaller?





          Administrative Installation



          You can't safely delete these files, they are there to facilitate uninstall, modify and repair operations for the installed product. You can, however, greatly reduce the size of the cached MSI files by running an administrative installation (essentially a file extraction) of the MSI before installing it. Follow link above for description - you should put these extracted files on a network share.



          The cached MSI files used to be small because they were stripped of their internal CAB files. However, starting with Windows 7 (MSI version 5) the MSI files are now cached full size to avoid breaking the file signature that affects the UAC prompt on setup launch (a known Vista problem). This may cause a tremendous increase in disk space consumption (several gigabytes for some systems).



          Running admin install will extract the files from the CAB files embedded in the MSI, adjust the media layout in the Media table in the new MSI so that running it will use the extracted, external source files instead of internal CABs. The new and smaller MSI file used for installation is then cached on the system. This can save several gigabytes of disk space, depending on what installers you use, how many you have to install, how big they are, etc... Keep in mind that you must deal with the UAC prompt issue described above when using admin images since the extracted MSI is (normally) no longer signed, but from a reputable source (your own extraction).



          The extracted files and the associated MSI file should be put on a network installation point along with all other installers to ensure files are available for repair operations. This is how most large corporations deal with installation anyway. Then there is no need for embedded CAB files in the cached MSI at all. SCCM and other deployment systems may also have other ways to ensure files are available for repair operations.



          Some further links:




          • Admin install, the built-in MSI support for file extraction

          • Purpose of Administrative Installs

          • How to speed up MSI installations

          • Why does MSI require the original .msi file to proceed with an uninstall?

          • The corporate benefits of using MSI files






          share|improve this answer















          Summary




          The directory %SystemRoot%Installer and its contents must never be meddled with. An unserviceable system almost always results. Same goes for WinSxS, Driver Store & GAC.



          The real issue is disc space - SSD drives are still too small for comfort. Below are some suggested procedures you can use to regain
          space in a safer way.



          Using administrative installations is a general purpose measure to
          reduce the size of the %SystemRoot%Installer folder for future deployments. See bottom section.






          Original & Long Answer




          Below are the essential / most effective options summarized from this
          original and messy answer: Trifles & Tricks: Obvious ways to free
          up disc space on your system
          drive
          (long).







          Express: Urgent 5-Minute Space Reclamation





          1. Storage: Insert a USB drive (low-profile if you want it connected permanently) or SD-card. Move the content of your Downloads and Largest Media folders on there. Use USB 3.X port! (blue / red / teal).


          2. Mongers Sweep: In Windows Explorer, select "Users folder" (C:Users), press F3 and select "Size: Gigantic" (or very large). Move them away if found - with caution:


            • Typically ISOs, Virtuals, Movie files, etc...

            • Careful with: Outlook PST files! Database files!

            • Avoid source code folders and virtual disks (move whole folder only)!




          3. Zap Re-downloadable Files?



            • iTunes?, ISOs?


            • Zap clouded files? (local cache)






          Many further options below. Just the 5-minute emergency procedure I use myself (trivial options).



          And obviously empty the recycle bin :-). Also quick to uninstall large, unused software packages.



          And check root of C: for virtuals and similar uses. Most large files should be in profile hierarchy though.





          Reclaim Disc Space - The Pragmatic Options



          Recommended real-world quick-options for disc space reclamation:



          Low-profile USB & SD Card





          • General: Removables & Disc Space Visualization.




            • Add a low-profile USB drive and / or SD-Card to your laptop for "permanent", extra storage to move large files to. Generally not high-speed, use accordingly. Note! I find low-profile USB drives may run a bit hot under load. Not for heavy, continuous use IMHO.


            • Find Space Hogs: https://en.wikipedia.org/wiki/WinDirStat. Visualization tool for disc space consumption. May run slowly on non-SSD disks. Shows what eats your disc.



          • Option 0: Clouding. Obviously. OneDrive, Dropbox, Google Drive, etc...



          • Option 2: Microsoft's Disk Cleanup Tool. Purge Windows Update files & more.



            • Windows Key + Tap R, type cleanmgr.exe and press Enter.

            • Select system drive and press OK

            • Now click Clean up System Files then select system drive and press OK.







          • UPDATE Oct.2018: In their infinite wisdom Microsoft has added the "Downloads" folder as a cleanup option! This is pure lunacy, DO
            NOT ENABLE!
            It deletes the whole downloads folder without question.






          • Option 7: Clean out Downloads folder (all users).


            • Move files to USB / SD / other partition.

            • Change default Downloads location: Right Click Folder => Properties => Location.

            • One shared location for all users - if applicable?




          • Option 18: Compression (selective folders?). In Folder Properties. May be ultra slow for old disks.


          • Option 19: Uninstall unnecessary software. Run appwiz.cpl from Windows Key + Tap R


          High risk option: Delete outdated and obsolete recovery partition(s) and create a usable partition in its place to keep data on.




          • Very effective when combined with options 1 (My Documents) & 7 (Downloads) & 11 (Data Heavy Applications), etc... Can end in disaster if wrong partition is deleted - of course.


          • To succeed deleting recovery partitions either diskpart (Windows) or gparted (Linux) is likely needed (see "Alternative Approaches" in linked SO answer). Not for the faint of heart or inexperienced. Backup is essential!



          Runners-Up: Option 4: Administrative Installation is presented below. Maybe also check Option 3: (CCleaner) (not without risk). And a final mention: you can turn off system restore as well (particularly for virtuals). Not listed in linked answer (max lenght).





          Scavenging / Putting WinSxS on a Diet



          The WinSxS folder - Win32 side-by-side assembly store is full of hard links (several shortcuts to the same "physical" file) and often obsolete versions that can never be used (superseded by policy and updates). You can run "Scavenging" - garbage collection for side-by-side Win32 assemblies.



          "Find actual size" command that is available since Win 8.1 (from elevated command prompt):



          Dism.exe /Online /Cleanup-Image /AnalyzeComponentStore  


          This goes beyond all the hard links in there and finds the actual size of the WinSxS folder - and whether it should be cleaned up.



          Run "Scavenging" (from elevated command prompt):



           Dism.exe /online /Cleanup-Image /StartComponentCleanup


          Microsoft's Disk Cleanup Tool: cleanmgr.exe seems to kick off "scavenging" sometimes. And there is a scheduled task (Win8 up) - kicking off cleanup. Slightly different from running the command. 30 days grace period before purging, and some timeout issues (ends after 1 hour, regardless).





          Superuser: Why does the /winsxs folder grow so large, and can it be made smaller?





          Administrative Installation



          You can't safely delete these files, they are there to facilitate uninstall, modify and repair operations for the installed product. You can, however, greatly reduce the size of the cached MSI files by running an administrative installation (essentially a file extraction) of the MSI before installing it. Follow link above for description - you should put these extracted files on a network share.



          The cached MSI files used to be small because they were stripped of their internal CAB files. However, starting with Windows 7 (MSI version 5) the MSI files are now cached full size to avoid breaking the file signature that affects the UAC prompt on setup launch (a known Vista problem). This may cause a tremendous increase in disk space consumption (several gigabytes for some systems).



          Running admin install will extract the files from the CAB files embedded in the MSI, adjust the media layout in the Media table in the new MSI so that running it will use the extracted, external source files instead of internal CABs. The new and smaller MSI file used for installation is then cached on the system. This can save several gigabytes of disk space, depending on what installers you use, how many you have to install, how big they are, etc... Keep in mind that you must deal with the UAC prompt issue described above when using admin images since the extracted MSI is (normally) no longer signed, but from a reputable source (your own extraction).



          The extracted files and the associated MSI file should be put on a network installation point along with all other installers to ensure files are available for repair operations. This is how most large corporations deal with installation anyway. Then there is no need for embedded CAB files in the cached MSI at all. SCCM and other deployment systems may also have other ways to ensure files are available for repair operations.



          Some further links:




          • Admin install, the built-in MSI support for file extraction

          • Purpose of Administrative Installs

          • How to speed up MSI installations

          • Why does MSI require the original .msi file to proceed with an uninstall?

          • The corporate benefits of using MSI files







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited 6 hours ago

























          answered Nov 5 '14 at 11:56









          Stein ÅsmulStein Åsmul

          2,19121933




          2,19121933








          • 2





            "You can't delete these files" -> You shouldn't delete these files, because doing so break stuff.

            – Chris S
            Nov 5 '14 at 16:31






          • 1





            Yes, deleting the files will cause the package to be uninstallable unless you have access to and can run the original installation media. Several other, serious problems will also surface with regards to patching, upgrades, repair, self-repair, etc... These are core OS resource files and must be left alone.

            – Stein Åsmul
            Nov 5 '14 at 16:33













          • At work, we've had a few Win10 PCs that have started to fill up their C: drive due to the remains of repeatedly failing Windows updates piling up in the C:WindowsInstaller folder. I've fixed these by using the Media Creation Tool to create Win10 media on a USB stick, which I then used to do an 'upgrade' install of Win10 over top of the existing Win10 install. Works perfectly, unless you don't have enough space on C: to do an 'upgrade' install, in which case you need to do some other cleanup first.

            – 3D1T0R
            Sep 25 '18 at 21:03











          • Would be interesting to know if the cleanmgr.exe (Microsoft Disk Cleanup Tool) would be able to clean that? It might not do so until after 30 days or something like that? I am not sure. The internal details of this tool remains mysterious, but it does a lot of things "under the hood". Seemingly different actions from time to time as well.

            – Stein Åsmul
            Sep 25 '18 at 21:06













          • cleanmgr.exe is always the first thing I do before I start digging into the rest of 'my space recovery tool kit'. In my experience, it's never done anything to help with cleaning up C:WindowsInstaller.

            – 3D1T0R
            Sep 26 '18 at 0:28














          • 2





            "You can't delete these files" -> You shouldn't delete these files, because doing so break stuff.

            – Chris S
            Nov 5 '14 at 16:31






          • 1





            Yes, deleting the files will cause the package to be uninstallable unless you have access to and can run the original installation media. Several other, serious problems will also surface with regards to patching, upgrades, repair, self-repair, etc... These are core OS resource files and must be left alone.

            – Stein Åsmul
            Nov 5 '14 at 16:33













          • At work, we've had a few Win10 PCs that have started to fill up their C: drive due to the remains of repeatedly failing Windows updates piling up in the C:WindowsInstaller folder. I've fixed these by using the Media Creation Tool to create Win10 media on a USB stick, which I then used to do an 'upgrade' install of Win10 over top of the existing Win10 install. Works perfectly, unless you don't have enough space on C: to do an 'upgrade' install, in which case you need to do some other cleanup first.

            – 3D1T0R
            Sep 25 '18 at 21:03











          • Would be interesting to know if the cleanmgr.exe (Microsoft Disk Cleanup Tool) would be able to clean that? It might not do so until after 30 days or something like that? I am not sure. The internal details of this tool remains mysterious, but it does a lot of things "under the hood". Seemingly different actions from time to time as well.

            – Stein Åsmul
            Sep 25 '18 at 21:06













          • cleanmgr.exe is always the first thing I do before I start digging into the rest of 'my space recovery tool kit'. In my experience, it's never done anything to help with cleaning up C:WindowsInstaller.

            – 3D1T0R
            Sep 26 '18 at 0:28








          2




          2





          "You can't delete these files" -> You shouldn't delete these files, because doing so break stuff.

          – Chris S
          Nov 5 '14 at 16:31





          "You can't delete these files" -> You shouldn't delete these files, because doing so break stuff.

          – Chris S
          Nov 5 '14 at 16:31




          1




          1





          Yes, deleting the files will cause the package to be uninstallable unless you have access to and can run the original installation media. Several other, serious problems will also surface with regards to patching, upgrades, repair, self-repair, etc... These are core OS resource files and must be left alone.

          – Stein Åsmul
          Nov 5 '14 at 16:33







          Yes, deleting the files will cause the package to be uninstallable unless you have access to and can run the original installation media. Several other, serious problems will also surface with regards to patching, upgrades, repair, self-repair, etc... These are core OS resource files and must be left alone.

          – Stein Åsmul
          Nov 5 '14 at 16:33















          At work, we've had a few Win10 PCs that have started to fill up their C: drive due to the remains of repeatedly failing Windows updates piling up in the C:WindowsInstaller folder. I've fixed these by using the Media Creation Tool to create Win10 media on a USB stick, which I then used to do an 'upgrade' install of Win10 over top of the existing Win10 install. Works perfectly, unless you don't have enough space on C: to do an 'upgrade' install, in which case you need to do some other cleanup first.

          – 3D1T0R
          Sep 25 '18 at 21:03





          At work, we've had a few Win10 PCs that have started to fill up their C: drive due to the remains of repeatedly failing Windows updates piling up in the C:WindowsInstaller folder. I've fixed these by using the Media Creation Tool to create Win10 media on a USB stick, which I then used to do an 'upgrade' install of Win10 over top of the existing Win10 install. Works perfectly, unless you don't have enough space on C: to do an 'upgrade' install, in which case you need to do some other cleanup first.

          – 3D1T0R
          Sep 25 '18 at 21:03













          Would be interesting to know if the cleanmgr.exe (Microsoft Disk Cleanup Tool) would be able to clean that? It might not do so until after 30 days or something like that? I am not sure. The internal details of this tool remains mysterious, but it does a lot of things "under the hood". Seemingly different actions from time to time as well.

          – Stein Åsmul
          Sep 25 '18 at 21:06







          Would be interesting to know if the cleanmgr.exe (Microsoft Disk Cleanup Tool) would be able to clean that? It might not do so until after 30 days or something like that? I am not sure. The internal details of this tool remains mysterious, but it does a lot of things "under the hood". Seemingly different actions from time to time as well.

          – Stein Åsmul
          Sep 25 '18 at 21:06















          cleanmgr.exe is always the first thing I do before I start digging into the rest of 'my space recovery tool kit'. In my experience, it's never done anything to help with cleaning up C:WindowsInstaller.

          – 3D1T0R
          Sep 26 '18 at 0:28





          cleanmgr.exe is always the first thing I do before I start digging into the rest of 'my space recovery tool kit'. In my experience, it's never done anything to help with cleaning up C:WindowsInstaller.

          – 3D1T0R
          Sep 26 '18 at 0:28


















          draft saved

          draft discarded




















































          Thanks for contributing an answer to Server Fault!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fserverfault.com%2fquestions%2f642177%2fhow-can-i-eliminate-the-huge-cached-msi-files-in-c-windows-installer%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          Фонтен-ла-Гаярд Зміст Демографія | Економіка | Посилання |...

          Список ссавців Італії Природоохоронні статуси | Список |...

          Маріан Котлеба Зміст Життєпис | Політичні погляди |...