User Tools

Site Tools


microsoft_windows:cleantemp

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Last revisionBoth sides next revision
microsoft_windows:cleantemp [2022/05/07 21:34] rodolicomicrosoft_windows:cleantemp [2022/11/14 03:14] rodolico
Line 24: Line 24:
 # Finally, Mozilla Firefox's cache # Finally, Mozilla Firefox's cache
 "Mozilla Cache {0:N2} GB" -f ((Get-ChildItem -force -recurse "C:\Users\*\AppData\Local\Mozilla\Firefox\Profiles\*\cache2" | measure length -s).sum / 1Gb) "Mozilla Cache {0:N2} GB" -f ((Get-ChildItem -force -recurse "C:\Users\*\AppData\Local\Mozilla\Firefox\Profiles\*\cache2" | measure length -s).sum / 1Gb)
 +</code>
  
-######### Do not blindly paste these lines in. Make sure you know what will happen #########+Do not blindly paste the following lines in. Make sure you know what will happen
 +The following actually does the deletion. However, the -WhatIf says "show me what you'd do", so you must remove //-WhatIf// that before it will actually clean up.
  
-# the following actually does the deletion. However, the -WhatIf says "show me what you'd do", so +<code powershell>
-# you must remove that before it will actually clean up.+
 Get-ChildItem –Path  “C:\Windows\Temp” –Recurse | Where-Object{$_.CreationTime –lt (Get-Date).AddDays(-30)} | Remove-Item -WhatIf Get-ChildItem –Path  “C:\Windows\Temp” –Recurse | Where-Object{$_.CreationTime –lt (Get-Date).AddDays(-30)} | Remove-Item -WhatIf
 Get-ChildItem -Path "C:\Users\*\AppData\Local\Temp" -Recurse | Remove-Item -Recurse -WhatIf Get-ChildItem -Path "C:\Users\*\AppData\Local\Temp" -Recurse | Remove-Item -Recurse -WhatIf
microsoft_windows/cleantemp.txt · Last modified: 2022/11/14 03:15 by rodolico