Back to docs
reference

File Deletion Behavior

What Happens When You Delete a Note

Strayfiles handles deletion differently based on how the note was added. This ensures we never destroy files we didn’t create.

Deletion by Note Type

Note TypeFile ActionMetadata Action
CreatedFile deleted from diskRemoved from database
DiscoveredFile kept, frontmatter cleanedRemoved from database
TOML-trackedFile unchangedRemoved from database

Created Notes

Notes you create via “Add Note” in Strayfiles:

  • Strayfiles created the file, so Strayfiles deletes it
  • The .md file is removed from disk
  • All metadata and version history are deleted
Delete → File removed → Database cleaned

Discovered Notes

Existing files you added to Strayfiles by injecting frontmatter:

  • The file stays on disk (we didn’t create it)
  • The strayfiles: block is removed from frontmatter
  • Other frontmatter fields (title, tags, etc.) are preserved
  • All Strayfiles metadata and version history are deleted
Delete → Frontmatter cleaned → Database cleaned → File remains

TOML-Tracked Notes

Files tracked only via strayfiles.toml roots (no frontmatter):

  • The file is never modified
  • Only the database reference is removed
  • The file continues to exist unchanged
Delete → Database cleaned → File unchanged

Version History

All version history is permanently deleted when you remove a note, regardless of note type.

Strayfiles does not keep hidden backups or “Recently Deleted” folders. This is intentional:

  • Your files, your responsibility — We don’t secretly retain your data
  • No lock-in — Hidden data would only be accessible through Strayfiles
  • Filesystem tools exist — Use Git, Time Machine, iCloud, or your backup solution

Recovery Options

If you need to recover deleted content:

MethodWorks For
Git historyAny file in a Git repo
Time MachinemacOS users
iCloud/Dropbox historyFiles in synced folders
Supabase backupsPro tier cloud data (contact support)

Pro Tier (Stray Cloud)

Stray Cloud notes follow the same deletion behavior:

  • Deletion syncs across all devices
  • Version history is deleted from Stray Cloud
  • No soft-delete or retention period

If you accidentally delete a Pro tier note, contact support — database backups may allow recovery within a limited window.

Design Philosophy

Strayfiles’ approach to deletion follows our core philosophy:

“Keep your notes exactly where they are. We’ll adapt to your system.”

We adapt to your backup strategy rather than imposing our own. If you want version history after deletion, use Git. If you want a safety net, use Time Machine. Strayfiles focuses on organization and sync, not competing with proven backup tools.