Search...Search plugins and themes...
⌘K
Sign in
  • Get started
  • Download
  • Pricing
  • Enterprise
  • Account
  • Obsidian
  • Overview
  • Sync
  • Publish
  • Canvas
  • Mobile
  • Web Clipper
  • CLI
  • Learn
  • Help
  • Developers
  • Changelog
  • About
  • Roadmap
  • Blog
  • Resources
  • System status
  • License overview
  • Terms of service
  • Privacy policy
  • Security
  • Community
  • Plugins
  • Themes
  • Discord
  • Forum / 中文论坛
  • Merch store
  • Brand guidelines
Follow us
DiscordTwitterBlueskyThreadsMastodonYouTubeGitHub
© 2026 Obsidian

VaultPrune - Unused Attachment Cleaner

barisdincerbarisdincer155 downloads

Scan your vault for attachments that are no longer referenced and review them before moving them to trash.

Add to Obsidian
  • Overview
  • Scorecard
  • Updates7

VaultPrune is an Obsidian plugin that helps you find attachments that are no longer referenced inside your vault.

Current repository: https://github.com/barisdincer/VaultPrune

The original project started as a Python prototype. Since Obsidian community plugins run on TypeScript/JavaScript, this repository is now being reshaped into a native Obsidian plugin.

Current direction

The plugin-first approach is a better fit for this project because:

  • the plugin can work directly against the currently opened vault
  • users do not need to type the vault path manually
  • review and cleanup can happen inside Obsidian
  • deleting files can respect Obsidian's trash behavior
  • the initial community release can stay desktop-focused for safer rollout

Planned behavior

VaultPrune is being designed around a safe cleanup flow:

  1. Scan the vault for likely attachment files.
  2. Detect which attachments are referenced by Markdown notes.
  3. Also consider file references inside Canvas files, including text-card links and group backgrounds.
  4. Prefer Obsidian's configured attachment folder when it can be determined, while allowing users to enter folders manually.
  5. Show unused attachment candidates in a review modal with search, extension filters, sorting, and bulk selection tools.
  6. Show quick previews for visual media and allow known-safe files to be ignored from future scans.
  7. Generate a preview-only report before moving reviewed files to trash.
  8. Let the user move selected files to trash.

Repository status

This repository now contains the initial Obsidian plugin scaffold:

  • manifest.json
  • package.json
  • tsconfig.json
  • esbuild.config.mjs
  • src/

The legacy Python script is still present as an early prototype/reference, but it is not part of the plugin runtime.

Local development

You need Node.js and npm on your machine to build the plugin.

npm install
npm run dev

To test the plugin manually, copy the built plugin files into:

<your-vault>/.obsidian/plugins/vaultprune/

Expected plugin files:

  • manifest.json
  • main.js
  • styles.css

For one-command local deployment into a vault:

VAULT_PATH="/absolute/path/to/your/vault" npm run deploy:local

Or after a build:

node scripts/install-local.mjs "/absolute/path/to/your/vault"

First milestone

The first plugin milestone focuses on:

  • scanning the vault safely
  • using Obsidian's attachment folder setting when available
  • listing unused attachment candidates
  • reviewing them in a modal
  • filtering and preview-reporting candidates before deletion
  • safe-listing known files that should stay in attachment folders
  • moving selected files to trash

Current commands

  • VaultPrune: Scan unused attachments
  • VaultPrune: Preview unused attachments report

Release preparation

This repository includes release helpers:

  • version-bump.mjs
  • versions.json
  • RELEASE.md

Suggested release flow:

npm run version
npm run build

Manual install in Obsidian

  1. Build the plugin.
  2. Copy manifest.json, main.js, and styles.css into:
<your-vault>/.obsidian/plugins/vaultprune/
  1. In Obsidian, open Settings -> Community plugins.
  2. If needed, disable Restricted mode.
  3. Enable VaultPrune - Unused Attachment Cleaner.

Platform support

The current release target is desktop only. This keeps the first community submission conservative while the plugin behavior is validated on real vaults.

Notes

  • The current scan logic is intentionally conservative.
  • Users should still review candidates before trashing them.
  • More advanced detection can be added later for plugin-specific file references and edge cases.

Security and disclosures

  • VaultPrune scans files inside the currently opened Obsidian vault to detect attachment references.
  • VaultPrune can move selected vault files to trash when the user explicitly confirms the action.
  • VaultPrune does not require an account.
  • VaultPrune does not send telemetry.
  • VaultPrune does not display ads.
  • VaultPrune does not intentionally access files outside the active vault during normal plugin operation.
  • VaultPrune does not require a paid service.
91%
HealthExcellent
ReviewSatisfactory
About
Find unused attachments across your vault, including references inside Markdown and Canvas files. Review candidates with search, filters, sorting and bulk selection, preview a report, then move chosen files to Obsidian's trash.
AttachmentsFilesUtilities
Details
Current version
0.1.6
Last updated
Last week
Created
2 years ago
Updates
7 releases
Downloads
155
Compatible with
Obsidian 1.8.7+
Platforms
Desktop only
License
MIT
Report bugRequest featureReport plugin
Author
barisdincerbarisdincer
github.com/barisdincer
GitHubbarisdincer
  1. Community
  2. Plugins
  3. Attachments
  4. VaultPrune - Unused Attachment Cleaner

Related plugins

Janitor

Perform cleanup tasks on your vault.

Custom Attachment Location

Customize attachment location with variables($filename, $data, etc) like Typora.

Notebook Navigator

A better file browser and calendar inspired by Apple Notes, Bear, Evernote and Day One.

Local REST API & MCP Server

Unlock your automation needs by interacting with your notes over a secure REST API.

QuickAdd

Quickly add new notes or content to your vault.

Recent Files

Display a list of recently opened files.

Omnisearch

Intelligent search for your notes, PDFs, and OCR for images.

Claudian

Embeds Claude Code/Codex as an AI collaborator in your vault. Your vault becomes agent's working directory, giving it full agentic capabilities: file read/write, search, bash commands, and multi-step workflows.

Vertical Tabs

Offer an alternative view that displays open tabs vertically, allowing users to group and organize tabs for a better navigation experience.

Image Converter

Convert, compress, resize, annotate, markup, draw, crop, rotate, flip, align, drag-resize, rename with variables, and batch process images: WEBP, JPG, PNG, HEIC, TIF