Auto Remove

by Reza Bahinkor
5
4
3
2
1
Score: 50/100

Description

An Obsidian plugin that gives files an expiry date. Notes declare how long they should live, or a folder decides for them; once the time is up, Auto Remove shows you exactly what it found and removes only what you confirm.

Reviews

No reviews yet.

Stats

4
stars
79
downloads
0
forks
48
days
47
days
48
days
3
total PRs
0
open PRs
1
closed PRs
2
merged PRs
0
total issues
0
open issues
0
closed issues
35
commits

Latest Version

2 months ago

Changelog

What's Changed

New Contributors

Full Changelog: https://github.com/Bahinkor/obsidian-auto-remove-plugin/commits/1.0.0

README file from

Github

فارسی / English

Auto Remove

An Obsidian plugin that gives files an expiry date. Notes declare how long they should live, or a folder decides for them; once the time is up, Auto Remove shows you exactly what it found and removes only what you confirm.

Vaults accumulate transient notes — inbox captures, daily scratch, half-finished drafts — that nobody ever gets round to clearing out. Auto Remove clears them out, without ever surprising you.

Cleanup never runs silently. Whenever expired files are found, a dialog lists them as a folder tree with every file selected.

How a file expires

The clock runs from a file's modified time, Editing a file restarts its time to live.

1. Notes that opt in

A note participates when its frontmatter says so:

---
auto-remove: true
ttl: 3
---
Frontmatter Result
auto-remove: true with ttl: 3 Expires 3 days after it was last modified
auto-remove: true with no ttl Expires after the default time to live (7 days)
ttl: 3 with no auto-remove The ttl is ignored. The note has not opted in — but it has not opted out either, so a folder rule may still claim it, using the folder's own TTL
auto-remove: false Never removed, by anything

Opted-in notes use the default action and default destination from settings. Folder rules never apply to them: an explicit opt-in is treated as the note's own instruction and outranks everything else.

auto-remove: false is the mirror image — an explicit refusal that no folder rule can override. It is how you exempt a single note from a rule covering its folder.

2. Folder rules

A folder rule applies a time to live to every file inside a folder, at any depth, including attachments and other non-Markdown files. Each rule sets its own TTL, action, destination and ignore patterns.

When rules nest, the most specific folder wins — a rule on Inbox/drafts overrides one on Inbox.

3. Anything else

A file no note and no rule claims is left alone. Auto Remove never acts on a file it was not explicitly told about.

In short

Priority Wins over
auto-remove: false Everything
auto-remove: true Folder rules, and their ignore patterns
Folder rule (deepest first) Shallower folder rules
Ignore patterns Any rule above it

Ignore patterns

Each folder rule takes gitignore-style patterns, one per line, resolved relative to that rule's folder:

Templates/**
*.canvas
*.pdf
!Templates/keep.md

Actions

Trash hands the file to Obsidian, which honours your own Settings → Files and links → Deleted files preference — system trash, the vault's .trash folder, or permanent deletion.

Move relocates the file to a destination folder, creating it if needed and renaming rather than overwriting if something is already there. Afterwards the auto-remove and ttl properties are stripped, so an archived note does not simply expire again from its new home.

Collaboration and Project Participation

This plugin has been developed with love, for non-commercial purposes, and under this license.

You can support our continued efforts in the following ways:

  • Contribute to the development of this plugin
  • Report bugs or suggest a feature for development via the Issues section on this GitHub page
  • Recommend installing and using this plugin to your friends
  • Follow our website and Telegram channel

Website Telegram Channel Telegram Group