41

Is it "safe" to delete any of the subfolders in C:\Program Files\Microsoft SQL Server\100\Setup Bootstrap\ from my drive to free up space?

Or is it needed for upgrade/uninstall and other patches? Right now the Update Cache folder contains KB968369 (sp1) which takes up 416mb, which seems like a candidate for freeing up space.

Mikael Svenson
  • 545
  • 1
  • 5
  • 9
  • 1
    It's 1.3 GB for Server 2012... – RomanSt Nov 28 '14 at 00:26
  • 3
    2.5 GB here. It's annoying how inefficient Windows Installer is. It leaves every single update setup package in full somewhere, also in C:\Windows\Installer. No non-MS technology does such stupid things. Need a bigger disk now. :-( – ygoe Dec 18 '14 at 08:09
  • information from Microsoft: https://support.microsoft.com/en-us/help/3196535/description-of-the-update-cache-folder-in-sql-server – juFo Jun 03 '19 at 09:09

5 Answers5

26

According to this site, you shouldn't. You can compress it and remove log files, but you shouldn't delete it.

If I hadn't googled for it I would probably have tried searching to see if any of the files were open, and if not, then copied them to a new location for storage until I was certain the server worked well without it, and if there was an issue recopy them over.

Then again I also have been known to delete the hidden/compressed update files in the Windows directory which is also considered bad practice from what some have said and have had no horrible side effects while freeing up hundreds of meg in space.

An alternative would be to look into installing larger drives and expanding your disk partitions. Depending on the role of the server this could be a major project, though, but in the end if you're in need of freeing space on a database server it's probably time to look at upgrading that subsystem, at least.

Bart Silverstrim
  • 31,092
  • 9
  • 65
  • 87
  • 2
    In this case it's unlikely MS will put out a SP2 for 2008 (as 2008 R2 has been released); but those files would be necessary if a SP2 comes out and he wanted to upgrade. They're also necessary if he ever wants to uninstall. I'd be more worried that he's grabbing at straws like 400mb. – Chris S Jun 23 '10 at 12:44
  • 2
    Actually it's on my dev laptop with an SSD disk, so hard to get more space in there. I tried googling a bit myself but couldn't find a definitive answer. I'll most likely copy them off to backup drive, and if I ever get a weird error when doing installl/upgrade on the SQL server I'll try and remember why :) – Mikael Svenson Jun 23 '10 at 19:45
  • 1
    So have you ever needed those files? It's 1GB in my case and as in your case I'm on small SSD. – Nux Oct 04 '12 at 08:59
2

don't delete it. Mine is 2.1 GB :'(

Questions and answers regarding SQL Server installation best practices, the files we can delete after a service pack is installed, user rights and how many instances are necessary for different application. 1. After you installed a Service Pack for SQL Server 2008 R2, is it possible to delete part of the files without altering the functioning of SQL Server? If yes, what files?

The files that are added during the installation of a Service Pack are absolutely necessary for the SQL Server instance (for which you installed the service pack) to function properly: http://msdn.microsoft.com/en-us/library/dd638062(v=SQL.105).aspx

 ”The recommended disk space requirements are approximately 2.5 times the size of the package to install, download, and extract the package. After installing a service pack, you can remove the downloaded package. Any temporary files are removed automatically.”

So the files that are added or modified during the installation of the Service Pack are absolutely necessary and is not indicated to delete them once the installation is finished.

The folder « C:\Program Files\Microsoft SQL Server\100\Setup Bootstrap\Update Cache » is used to verify what are the service packs or cumulative updates already installed and it is also not indicated to delete it. Normally, as the article mentioned above explains, after the service pack is installed he will delete the temporary files he created and that are no longer necessary.

The only thing that can be deleted after the service pack is installed is the installation kit that was used to install the service pack.

https://blogs.technet.microsoft.com/beatrice_popa/2013/02/12/sql-server-best-practices-for-installation-delete-files-after-service-pack-installation-applications-on-instances-and-security/

juFo
  • 393
  • 3
  • 9
  • 21
2

An alternative solution if you're low on disk space, would be to move the contents to a new directory on a different drive/partition, then use mklink /j to create a junction. More info on junctions can be found here https://msdn.microsoft.com/en-us/library/windows/desktop/aa365006(v=vs.85).aspx

1

From Microsoft site:

If the Update Cache folder or some patches are removed from this folder, you can no longer uninstall an update to your SQL Server instance and then revert to an earlier update build. In that situation, Add/Remove Programs entries point to non-existing binaries, and therefore the uninstall process does not work. Therefore, Microsoft strongly encourages you to keep the folder and its contents intact.

I think, it depends totally on your situation. I have two SQL Server Express instances running currently for development. One is 2012 instance which is old, as I will not remove patches installed long ago and probably no new patches will be available, I will remove files from this directory. If problems occur for future updates uninstall and install again will be pussible, I guess.

1

https://support.microsoft.com/en-us/help/3196535/description-of-the-update-cache-folder-in-sql-server

don't remove it:

Summary

The Update Cache folder for Microsoft SQL Server is found in the following location:

C:\Program Files\Microsoft SQL Server\\Setup Bootstrap\Update Cache

This article provides information to help you understand why this folder is created and what it's used for. More Information

When is this folder created and what is it used for?

When you install any SQL Server update (cumulative update, critical update, or service pack), the update installation media is cached in the SQL Server Update Cache folder. The entries in Add/Remove Programs are created from the contents of the cached media folder and are used to uninstall (as necessary) the most recent update that was applied to a particular component. The folder may contain multiple earlier updates, allowing for sequential removal of those updates if required.

A variation of this model occurs when a component was installed by a stand-alone MSI file instead of by SQL Server Setup. These components are serviced in-place by replacing the previous MSI file with the new one, without maintaining a history of previous versions. The original MSI file is required for both uninstall and repair operations.

When is this folder cleaned up or removed?

When all patches are removed from all instances, or when the product is uninstalled.

Why does the folder continue to grow in size?

The folder grows in size with each update that's applied to your SQL Server instance. This growth occurs because each earlier version must be cached. This behavior ensures that you can always access an earlier update if you need to.

What happens if you remove this folder or delete its contents?

If the Update Cache folder or some patches are removed from this folder, you can no longer uninstall an update to your SQL Server instance and then revert to an earlier update build. In that situation, Add/Remove Programs entries point to non-existing binaries, and therefore the uninstall process does not work. Therefore, Microsoft strongly encourages you to keep the folder and its contents intact.

juFo
  • 393
  • 3
  • 9
  • 21