Releases: Lorite/obsidian-unlink-on-delete
Release list
1.0.1
Requires Obsidian 1.6.6 or later.
Confirm before anything is deleted
Obsidian's own delete cannot be intercepted, so this adds a delete the plugin owns end to end: Delete and clean up links in a file's right-click menu, and the matching command. You see what points at the file and decide what happens to those links before it is deleted. Dismiss the dialog and nothing happens at all, neither the delete nor the edits.
Deleting normally still works as before, cleaning up afterwards.
Point links at another note instead of removing them
A note is often deleted because it was merged into another one. The dialog now offers a replacement note per deleted file, with ranked suggestions and the reason each was suggested: an alias match, the same name in another folder, a similar name, shared tags, or a note the deleted one linked to.
Repointed links keep their subpath and keep an alias you wrote, but drop an implicit one, so [[Old Paper]] becomes [[New Paper]] rather than [[New Paper|Old Paper]]. Links are rebuilt in your own configured link style.
Suggestions are never applied on their own. A broken link is loud and stays visible, while a link silently repointed at the wrong note looks correct forever.
Tag matching ignores tags carried by more than 5% of the vault, and tags that a shared folder implies anyway, so vaults that mirror their folder tree into tags do not score every sibling note identically.
Settings in settings search
Settings are declared through getSettingDefinitions, so they appear in Obsidian's settings search on 1.13.0 and later.
1.0.0
First release.
Obsidian updates internal links when you rename a note. When you delete one, the links pointing at it are left behind, pointing nowhere. This plugin closes that gap: delete a file and the links that pointed at it are cleaned up straight away.
What it handles
- Wikilinks
[[Foo]],[[Foo|bar]],[[Foo#Heading]] - Embeds
![[Foo]], including images and other attachments - Markdown links
[bar](Foo.md) - Frontmatter properties such as
related:andprojects:
Deleting a folder covers the files inside it, and deleting several files at once is handled as a single pass.
What it leaves behind
Either plain text ([[Foo|bar]] becomes bar, so the sentence still reads correctly) or struck-through and dated (~~Foo~~ (removed 2026-08-09)). Properties always become plain text, since strikethrough would only be a literal string in YAML, or the value can be dropped entirely.
Only the file you deleted
Unlike a broken-link sweeper, this never strips links in bulk. It touches only links pointing at the file just deleted, and only after confirming they no longer resolve to anything live. Unresolved links you keep on purpose, as placeholders for notes not yet written, are never touched.
A confirmation dialog listing the affected notes is shown by default, and there is an excluded-folders list for templates and archives.
Installing
Not yet in the community directory. Download main.js, manifest.json and styles.css below into <vault>/.obsidian/plugins/unlink-on-delete/, then enable it under Settings → Community plugins.