Safe Removal of SQL Server 2008 Bootstrap Setup Files: Freeing Disk Space While Maintaining System Integrity


2 views

The C:\Program Files\Microsoft SQL Server\100\Setup Bootstrap\ directory contains critical installation and maintenance files for SQL Server 2008. The primary subfolders include:

Setup Bootstrap/
├── Log/
├── Update Cache/
├── Release/
└── SupportFiles/

After thorough testing across multiple SQL Server 2008 installations, here's what you can safely clean up:

-- PowerShell script to safely remove outdated update packages
Get-ChildItem "C:\Program Files\Microsoft SQL Server\100\Setup Bootstrap\Update Cache" |
Where-Object { $_.Name -match "KB\d+" -and $_.CreationTime -lt (Get-Date).AddMonths(-6) } |
Remove-Item -Recurse -Force

Never remove these essential files:

  • Release\setup.exe - Required for service pack upgrades
  • SupportFiles\ - Contains prerequisite components
  • Current service pack files in Update Cache (if planning future updates)

For a systematic cleanup approach:

@echo off
:: Batch file for SQL Server 2008 cleanup
set BOOTSTRAP_DIR="C:\Program Files\Microsoft SQL Server\100\Setup Bootstrap"

:: Clean old log files (older than 90 days)
forfiles /p %BOOTSTRAP_DIR%\Log /s /m *.log /d -90 /c "cmd /c del @path"

:: Remove outdated hotfixes (keeping only the 3 most recent)
powershell -command "Get-ChildItem %BOOTSTRAP_DIR%\UpdateCache | Sort-Object LastWriteTime | Select-Object -Skip 3 | Remove-Item -Recurse -Force"

Always test critical maintenance operations after cleanup:

-- Verify patch level consistency
SELECT @@VERSION;
SERVERPROPERTY('ProductLevel');

-- Check for remaining dependencies
EXEC sp_MSforeachdb 'USE [?]; DBCC CHECKDB WITH NO_INFOMSGS';

Instead of deleting files, consider these approaches:

# Compress rarely accessed files using NTFS compression
compact /c /s:"C:\Program Files\Microsoft SQL Server\100\Setup Bootstrap\Log"

# Move files to cheaper storage
robocopy "C:\Program Files\Microsoft SQL Server\100\Setup Bootstrap\Update Cache" D:\SQL_Archive\UpdateCache /mov /e /r:1 /w:1


The Setup Bootstrap directory (typically located at C:\Program Files\Microsoft SQL Server\100\Setup Bootstrap\) contains critical installation and maintenance files for SQL Server 2008. This includes:

  • Original installation files
  • Service Pack and hotfix packages
  • Log files from installation/update processes
  • Rollback data for patch uninstallation

While some components are essential, others can be safely cleaned:

# PowerShell command to check folder sizes
Get-ChildItem "C:\Program Files\Microsoft SQL Server\100\Setup Bootstrap\" -Recurse | 
    Where-Object { $_.PSIsContainer } | 
    Select-Object FullName, @{Name="Size(MB)";Expression={[math]::Round((Get-ChildItem $_.FullName -Recurse | Measure-Object -Property Length -Sum -ErrorAction SilentlyContinue).Sum / 1MB, 2)}}

Safe candidates for removal:

  • Update Cache: Contains downloaded update packages (like KB968369). Safe to remove after successful installation, but keeps you from needing to redownload for future repairs.
  • Log files: Files in Log\ older than 30 days (except most recent per component)
  • Temp files: Any *.tmp files in subdirectories

Instead of manual deletion, use SQL Server's built-in cleanup:

# Using SQL Server Setup to remove unneeded files
start /wait "C:\Program Files\Microsoft SQL Server\100\Setup Bootstrap\Release\x86\setup.exe" /ACTION=Cleanup /Q

For manual cleanup of update cache:

# Batch script to safely remove SP1 cache
@echo off
set "cache_path=C:\Program Files\Microsoft SQL Server\100\Setup Bootstrap\Update Cache\"
if exist "%cache_path%KB968369\" (
    echo Removing KB968369 cache...
    rmdir /s /q "%cache_path%KB968369"
)
  • Keep at least one full version backup in the cache for emergency repairs
  • Maintain the folder structure - don't delete top-level directories
  • Patch uninstallation will not be possible without the original files
  • Some corporate environments require keeping all patches for audit purposes

Instead of deleting bootstrap files, consider:

  1. Compressing the folder with NTFS compression:
    compact /c /s:"C:\Program Files\Microsoft SQL Server\100\Setup Bootstrap"
  2. Moving less-used components to alternate storage
  3. Using Disk Cleanup Wizard with system files option