Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>Remote SSH CleanerNew to Visual Studio Code? Get it now.
Remote SSH Cleaner

Remote SSH Cleaner

CIC-IT Nancy

|
1 install
| (0) | Free
Cleans old VS Code Server versions, obsolete extensions, and cached downloads in the remote environment.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Remote SSH Cleaner

A VS Code extension that runs on the remote host to clean up old VS Code installations based on @XDflight’s script.

Features

  • Automatic check at startup with notifications and action buttons;
  • Preview before deletion;
  • Cleans up downloaded VSIX files, CLI logs, and .vsctmp folders;
  • Retains the server reference via cli/servers/lru.json;
  • Retains the most recent version of each extension;
  • Cleans ~/.cache only upon explicit activation.

Installation

Search "Remote SSH Cleaner" in VSCode store and click install.

Manual Installation

npm install
npx vsce package

Then use Extensions: Install from VSIX....

Commands

  • Remote SSH Cleaner: Preview Cleanup
  • Remote SSH Cleaner: Clean Now

Startup Check

By default, five seconds after a remote window is opened, the extension scans for items that can be cleaned up. If it finds any, a notification offers the following options:

  • Clean Now: displays a confirmation prompt for deletion;
  • View Details: Opens the preview in the output channel;
  • Ignore: Closes the notification for this session.

Available settings:

  • remoteSshCleaner.checkOnStartup: Check at startup whether a cleanup is required;;
  • remoteSshCleaner.startupDelaySeconds: Delay in seconds before the automatic startup check;
  • remoteSshCleaner.cleanUserCache: Delete the complete ~/.cache directory. Disabled by default;
  • remoteSshCleaner.cleanDownloadedVsix: Delete data/CachedExtensionVSIXs;
  • remoteSshCleaner.cleanOldServers: Delete server versions not referenced by lru.json;
  • remoteSshCleaner.cleanOldExtensions: Keep only the newest version of each extension.

Dev Containers Compatibility

The extension works in a Dev Container window because it is declared as a workspace extension. It therefore runs inside the container and cleans up the container’s ~/.vscode-server folder.

Important Limitations:

  • It does not clean the Docker host from within the container;
  • In a Remote SSH followed by Dev Container configuration, it cleans the container, not the SSH host directly;
  • If the container is recreated frequently, cleaning may be of little use since its filesystem is already replaced;
  • The ~/.cache folder remains disabled by default.

Size Formatting

Readable sizes are generated by @draconides/format using binary conversion, byte-based notation, minimal units, and French numeric formatting.

Acknowledgements

This project was initially developed with assistance from Microsoft 365 Copilot for code generation, documentation, and internationalization.

The code was subsequently reviewed, corrected, tested, and maintained by CIC-IT Nancy.

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
  • Your Privacy Choices
  • Consumer Health Privacy
© 2026 Microsoft