Jump to content

Windows 11 Clear Temp Files: |best|

# Calculate sizes and clean $results = @()

# 6. Windows Update Cache $windowsUpdate = "$env:SystemRoot\SoftwareDistribution\Download" $locations += @Path = $windowsUpdate; Name = "Windows Update Cache" windows 11 clear temp files

Write-Host "" Write-Host "Total space freed: $(Format-FileSize $totalFreed)" -ForegroundColor Green Write-Host "========================================" -ForegroundColor Cyan # Calculate sizes and clean $results = @() # 6

function Clean-Folder param($Path) $originalSize = Get-FolderSize $Path try Remove-Item -Recurse -Force -ErrorAction SilentlyContinue $newSize = Get-FolderSize $Path return [math]::Round($originalSize - $newSize, 2) catch return 0 Name = "Internet Cache"

# 8. Temporary Internet Files $internetTemp = "$env:USERPROFILE\AppData\Local\Microsoft\Windows\INetCache" $locations += @Path = $internetTemp; Name = "Internet Cache"

×
×
  • Create New...