Skip to content
| Marketplace
Sign in
Visual Studio Code>SCM Providers>Auto Delete Old FilesNew to Visual Studio Code? Get it now.
Auto Delete Old Files

Auto Delete Old Files

Preview

Gip3

|
5 installs
| (0) | Free
Automatically delete old files based on configurable patterns and age
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

auto-delete-old-files

[License: MIT]

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

  • Full License: €2.99 (one-time purchase)
  • Purchase: Buy on Visual Studio Marketplace

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

  1. From Visual Studio Marketplace

    1. Open the Extensions view (Ctrl+Shift+X).
    2. Search for auto-delete-old-files.
    3. 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

  1. Open a folder/workspace in VS Code.
  2. The extension activates automatically and scans for files older than maxAgeDays.
  3. Invoke Preview Files to Delete from the Command Palette (Ctrl+Shift+P).
  4. Select or deselect files in the list and click Delete Selected.
  5. 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!

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft