Can we safely remove C:\ProgramData\Microsoft\VisualStudioSecondaryInstaller folder?

Solution 1:

The best way to check if this folder is necessary for operation of the software is to move it to another place and see what happens. If software runs normally even though the folder is no longer in previous place then it is not needed.
Probably those files are just temporary installer files, many developers have this annoying habit of unpacking files into obscure places and leaving them to take up unnecessary space.

Solution 2:

Officially you should not remove this folder, as per the MSDN forum mentioned in Koenyn's answer.

However it seems to be "safe" (for some definition of safe) to free up some space by moving certain parts of it to another disk e.g. an external HDD.

It appears that these installers are placed for potential future use on-demand if you want to use certain features of Visual Studio - if you know you're never ever going to want to use certain features of Visual Studio in future, then you could move certain items elsewhere to free up space on your C: drive.

For example after installing Visual Studio 2015 I moved the following to a separate drive:

  • AndroidSDK*
  • Win10_Emulator_*
  • VSEmu_Android*

because I knew I wouldn't be doing any mobile dev for Android or Windows Phone.

This freed up 8GB out of the 16GB present in my VisualStudioSecondaryInstaller folder.