Skip to content

Commit 523680d

Browse files
committed
DailyMaintenance.ps1: clean NuGet cache
1 parent 4a73142 commit 523680d

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

scripts/build-agents/Daily-Maintenance.ps1

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,12 @@ Write-Host "Executing daily maintenance..."
4343
# Remove all Docker images that have not been used for 7 days.
4444
docker image prune -a --filter "until=168h" --force
4545

46+
# Remove PostSharp and Metalama from the NuGet package cache
47+
# We assume that TeamCity runs as SYSTEM.
48+
$packageDir = "C:\Windows\system32\config\systemprofile\.nuget\packages"
49+
Remove-Item $packageDir/Metalama* -Force -Recurse
50+
Remove-Item $packageDir/PostSharp* -Force -Recurse
51+
4652
# Pull this repo.
4753
git pull
4854

0 commit comments

Comments
 (0)