Overview Version History Q & A Rating & Review
auto-delete-old-files
[ ]
A Visual Studio Code extension that automatically scans and removes files older than a user‑specified number of days when a workspace is opened, featuring an interactive preview panel and full cross‑platform support.
🔓 Enjoy a full-feature 7‑day free trial — after the trial, purchase a license on the Visual Studio Marketplace to continue using all features.
Pricing
Requirements
Visual Studio Code version >= 1.60.0
Features
Automatic Cleanup : Triggered on each workspace open, no manual commands needed.
Configurable Rules : Include/exclude glob patterns, maximum file age, dry‑run mode.
Interactive Preview : WebView panel listing candidate files with checkboxes for selection.
Dry‑Run Mode : Preview deletions without modifying the file system.
Cross‑Platform Support : Works on Windows, macOS, and Linux.
Error Handling : Detailed logs and safe failure modes.
Installation
From Visual Studio Marketplace
Open the Extensions view (Ctrl+Shift+X
).
Search for auto-delete-old-files .
Click Install .
Configuration
Open Settings (Ctrl+,
) and search for Auto Delete Old Files . Configure the following options:
Setting
Type
Description
Default
autoDeleteOldFiles.enabled
boolean
Enable or disable the extension
true
autoDeleteOldFiles.maxAgeDays
number
Maximum file age (in days) before deletion
30
autoDeleteOldFiles.includePatterns
string[]
Glob patterns for files to include
['**/*']
autoDeleteOldFiles.excludePatterns
string[]
Glob patterns for files to exclude
['**/node_modules/**']
autoDeleteOldFiles.dryRun
boolean
Preview mode without deletion
true
autoDeleteOldFiles.confirmDeletion
boolean
Show confirmation dialog before deleting files
true
Usage
Open a folder/workspace in VS Code.
The extension activates automatically and scans for files older than maxAgeDays
.
Invoke Preview Files to Delete from the Command Palette (Ctrl+Shift+P
).
Select or deselect files in the list and click Delete Selected .
Confirm the deletion in the warning dialog.
Commands
Command
Description
Auto Delete Old Files: Preview
Show preview of old files
Auto Delete Old Files: Cleanup
Immediately delete files (no dry-run)
License
This project is licensed under the MIT License – see the LICENSE file for details.
Enjoy a cleaner workspace, effortlessly!