Orphan Cleaner
approvedby trbatukim
Finds and deletes orphan nodes. - This plugin has not been manually reviewed by Obsidian staff.
★ 1 stars↓ 29 downloadsUpdated 4d agoMIT
Orphan Cleaner
An Obsidian plugin that finds and deletes orphan files — files that have no incoming or outgoing links anywhere in your vault — so you can keep your vault free of stray notes and attachments.
Features
- Scans your vault for files with no incoming links (nothing references them) and no outgoing links (they don't link out to anything else).
- Shows a confirmation dialog listing every orphan file found before anything is deleted, and warns you how deletion will behave based on your vault's trash setting (system trash, vault
.trash, or permanent deletion). - Deletes files through Obsidian's file manager, respecting your vault's trash settings.
- Configurable file extensions to scan (defaults to
md png jpeg pdf). - Configurable excluded paths — folders or specific files that should never be treated as orphans.
- Optional setting to skip any file that has at least one tag, even if it's otherwise unlinked.
Usage
- Click the trash-can ribbon icon, or run Clean orphan nodes from the command palette.
- Review the list of orphan files in the confirmation dialog.
- Confirm to delete them (moved to trash per your vault's trash setting), or cancel to back out.
Settings
Open Settings → Orphan Cleaner to configure:
- File extensions — space- or comma-separated list of extensions to check (without dots), e.g.
md png jpeg pdf. - Excluded paths — one folder or file path per line, relative to the vault root. Files inside these folders, or matching these exact paths, are never treated as orphans.
- Exclude files with tags — when enabled, any file that has at least one tag is never treated as an orphan, even if nothing links to it.
Installing
- Download
main.js,manifest.json, andstyles.cssfrom the latest release. - Copy them into
<VaultFolder>/.obsidian/plugins/orphan-cleaner/. - Reload Obsidian and enable Orphan Cleaner in Settings → Community plugins.
Development
npm install # install dependencies
npm run dev # compile in watch mode
npm run build # type-check and produce a production build
npm run lint # run eslint
Copy or symlink the repo into <VaultFolder>/.obsidian/plugins/orphan-cleaner/ for local testing, then reload Obsidian after each build.
License
See LICENSE.
For plugin developers
Search results and similarity scores are powered by semantic analysis of your plugin's README. If your plugin isn't appearing for searches you'd expect, try updating your README to clearly describe your plugin's purpose, features, and use cases.