Monday, 5 March 2012

Free ~4GB of disk space used by XE2 installation files

Update: this may not be a good idea - see below.

Original post: I run on a rather disk-space-restricted system, with Windows running on a 50GB "disk" in VMWare Fusion.  50GB isn't much, but it's a lot when I only have a 128GB disk on the host machine, too (a speedy SSD.)  Most of that 50GB is validly used, but I had only 1GB free when I expected to have 5 or 6 - not enough to install XE2 Update 4.

The Disk Cleanup tool showed only a few megabytes of possible files to delete.  So I went hunting for large folders that didn't contain data I knew I wanted, and found the following in c:\Program Data:


(On Windows 7, c:\Program Data is the non-roaming 'all users' application data path, the path returned when passing CSIDL_COMMON_APPDATA to SHGetFolderPath.)

The eight folders with GUID names contained 3.83GB of files that appear to be part of the C++Builder XE2 installer and help installer.  They appeared to contain boost installation files, help update files, and what appear to be general updates: a lot of folders named after components or folders in the C++ Builder installation directory.  Luckily, the folders were compressed, but they still took up almost 4GB - that's about 8% of my hard disk space.  Deleting these has done no visible harm.  Together with a few other deleted files, I now have about 7GB free disk space, hopefully enough to install the XE2 update.

Follow this at your own risk, but if you are running C++Builder or Delphi on a virtual machine and disk space is low, try looking here.

Update: At this stage I was thinking 'Great!  I've got rid of 4GB of space that the installer for the version I'm about to get rid of used.  Now I can use that space to install update 4!'  But I soon found out:

Following the XE2U4 instructions, I tried to uninstalled XE2 from the Add/Remove Programs applet.  All the 'Uninstall' menu item did was remove the XE2 entry from the Programs list.  It was at this point that I realised the installation files I had deleted were probably also uninstallers.  I don't know why all 4GB are required, but it seems a fair conclusion that's what these folders / files were for.

When I ran the XE2U4 installer, it thought it was already installed, and so I chose the option to uninstall rather than repair.  Uninstalling showed several errors about 'unable to load required plugin', but seemed to mostly work.  I then re-ran the installer, and XE2U4 seemed to install itself properly.

So: if you desperately need space, deleting the old installation files seems to work ok, but might not be a wise idea.  It might be better to uninstall XE2, and then delete the old installation files, in order to free disk space.

Given this is at least the second (?) update to XE2 that has required uninstalling and reinstalling, and that the entire installation data set of 4GB or so seems to need to stay around in order to uninstall, it would be great to see this trimmed and a dedicated uninstall option provided by Embarcadero.  Of course, the best option is to always be able to update, not uninstall and reinstall.  At that point, the old installer becomes useless and can be removed.

7 comments:

  1. Why not simply use Revo Uninstaller to cleanup? See http://www.revouninstaller.com/

    ReplyDelete
  2. It seems a pity to have to buy a separate product to remove things like that!

    This post started out as "There seems to be junk left over in this folder, if you didn't know it's there now you do!" and moved to "Oops, it might not be junk after all." But disk space is important again now we have small SSDs and virtual machines - 4GB of something, whatever it is, is too much to be ok to have just sitting around uselessly. The uninstaller shouldn't use that much disk space.

    ReplyDelete
  3. With two versions of XE2 requiring reinstalls we've resorted to just installing it into a clean vm. Then no worries about maintaining the ability to uninstall. Hopefully this trend will change.

    ReplyDelete
  4. I don't know about XE2, but manual uninstall always was a better option if you want to remove other versions of Delphi. All it takes is to remove a couple of Registry entries (HKCU and HKLM sub-trees) and Program Files subfolder. Only a few files are written to system folders and many of them are left there by the uninstaller anyway...

    Best regards

    ReplyDelete
  5. If the installation is MSI based and normal uninstall does not work any more use "MSIZap" (msdn.microsoft.com/en-us/library/windows/desktop/aa370523.aspx) to clean up the MSI database. "MSIZap" is part of the Windows Installer SDK.

    Best regards,
    Olaf

    ReplyDelete
  6. This comment has been removed by the author.

    ReplyDelete
  7. You can easily remove all subfolders of this folders with GUID names, probably except OFFLINE one. After that you will lose the ability to repair or update your installation, but uninstall still will be fully functional.
    By the way, update is worse then full reinstall, because it creates additional ~1Gb file in the Windows folder. This file can be used to rollback update in case of errors.

    ReplyDelete