This commit is contained in:
mikemikimike 2026-08-15 22:36:37 +08:00 committed by GitHub
commit 52a99787bb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 6 additions and 0 deletions

View File

@ -72,6 +72,12 @@ struct Prune: AsyncParsableCommand {
if let spaceBudget = spaceBudget {
try Prune.pruneSpaceBudget(prunableStorages: prunableStorages, spaceBudgetBytes: UInt64(spaceBudget) * 1024 * 1024 * 1024)
}
// Pruning digest-addressed OCI images can leave their tag symlinks broken.
// Run garbage collection after deletion so it can remove those links.
if entries == "caches" && (olderThan != nil || spaceBudget != nil) {
try VMStorageOCI().gc()
}
}
static func pruneOlderThan(prunableStorages: [PrunableStorage], olderThanDate: Date) throws {