diff --git a/crates/cli/src/commands/clean.rs b/crates/cli/src/commands/clean.rs index 83f91815a..3c807b93e 100644 --- a/crates/cli/src/commands/clean.rs +++ b/crates/cli/src/commands/clean.rs @@ -333,6 +333,18 @@ pub async fn internal_clean( ); } + debug!("Cleaning cache directory..."); + + let results = + fs::remove_dir_stale_contents(&session.env.store.cache_dir, Duration::from_secs(86400))?; + + if log && results.files_deleted > 0 { + println!( + "Successfully cleaned {} cache files ({} bytes)", + results.files_deleted, results.bytes_saved + ); + } + Ok(None) }