Tutorials 20 min read

Deleted the Wrong Note? Your OS Already Has a Recovery Drawer — If Your Notes Are Plain Files

MMNMNOTE
trashrecoverdeleted-notefreedesktopmacoswindowslinuxplain-textfile-ownershipbackup

When notes are plain files, deleting one drops the file into the operating system's standard trash — a spec-defined folder that holds a recoverable copy until the window expires. The map below shows where deleted files actually go on macOS, Windows, and Linux, plus six honest limits on the recovery promise.

The Linux desktop trash is governed by a freedesktop.org standard stable since January 2, 2014 1. macOS exposes its trash through Finder with a documented 30-day auto-empty option 2. Windows surfaces the Recycle Bin through a system folder constant — CSIDL_BITBUCKET — that has been part of the Shell API since the Win32 era 3. None of this depends on a note app being alive next year. The recovery belongs to the file, and the file belongs to you. As the Obsidian CEO put the broader principle: "Apps are ephemeral, but your files have a chance to last." 4

How the recovery drawer actually works

Every desktop operating system separates two operations that look like one — delete and erase. Delete moves your file into a reserved folder, the trash. Erase removes the bytes from that reserved folder. The gap between the two is the recovery window — measured in days on iCloud, in disk space on Windows, by your desktop environment on Linux.

The freedesktop specification names the design intent directly: "Users do not expect that anything they delete is permanently gone. Instead, they are used to a 'Trash can' metaphor." 5 A vendor's "30-day trash" feature is almost always a UI over this same OS-level reserved folder — or a duplicate of it inside the app's own storage. When the file is plain markdown, you do not need the UI. The folder is right there, with the file in it, until you say otherwise.

Where deleted files go on macOS

On macOS, every user account has its own Trash at ~/.Trash — a hidden folder inside the home directory. External volumes carry their own per-user trash at <volume>/.Trashes/<user-id>. Finder treats both as one bin. The auto-empty setting is documented in Apple's own User Guide 2, and it has two faces that most readers — and most secondary articles — quietly conflate.

For files moved to the Trash from iCloud Drive, Apple states the rule unambiguously: "Items that you move to the Trash from iCloud Drive are automatically emptied from the Trash after 30 days, regardless of Finder settings." 2 iCloud-side retention is fixed at 30 days and you cannot turn it off.

For files moved to the Trash from your local disk, the 30-day auto-empty is opt-in. Apple lists it as step two of a setup procedure: "Select 'Remove items from the Trash after 30 days.'" 2 If you have not turned that on in Finder > Settings > Advanced, your local Trash holds files until you empty it manually or the disk fills up.

Once auto-empty does fire, the file is gone from the Trash. Apple's wording is unambiguous: "Items that were automatically removed from the Trash are permanently deleted and are no longer available." 2 That sentence is the upper bound of the OS recovery promise on macOS.

Where deleted files go on Windows

On Windows, the Recycle Bin is the user-facing name for a system folder Microsoft has documented since the CSIDL era — its API constant is CSIDL_BITBUCKET, defined as "the virtual folder that contains the objects in the user's Recycle Bin." 3 Modern Windows aliases the same folder as FOLDERID_RecycleBinFolder 3.

The backing store lives per volume at C:\$Recycle.Bin\, with a subfolder named after each user's Security Identifier (SID) — so C:\$Recycle.Bin\<user-SID>\ is where your own deleted files land on the C: drive 6. Other drives carry parallel $Recycle.Bin directories, each with the same per-user SID layout.

Windows differs from macOS on one point that matters for the recovery promise — there is no time-based auto-empty by default. The Recycle Bin auto-empties when it runs out of room. Each drive carries a configurable size cap; once the cap is hit, the oldest deleted files are pushed out to make room for the newest. The recovery window is therefore measured in disk space, not days. Delete a 50 MB note onto a Recycle Bin with 49 MB of headroom and an older file gets evicted; with plenty of room, a deletion can sit there for years.

Windows 10 added an opt-in Storage Sense feature that can empty the Recycle Bin on a schedule, but the default behavior is the size-cap eviction. Open the Recycle Bin Properties to see your current per-drive cap.

Where deleted files go on Linux

On Linux, the desktop trash is governed by the freedesktop.org Trash Specification v1.0, authored by Mikhail Ramendik, David Faure, Alexander Larsson, and Ryan Lortie 1. The spec defines a per-user home trash whose name and location come from the XDG Base Directory standard — "Its name and location are $XDG_DATA_HOME/Trash" 1. In a default install, that resolves to ~/.local/share/Trash/.

Files on other mounted volumes get their own trash at the volume's top directory, typically <volume>/.Trash-<user-id>/, so the OS never has to move bytes across filesystem boundaries.

The inside of a trash directory is the part that matters. The spec is precise: "A trash directory contains two subdirectories, named info and files." 1 The files/ subdirectory holds the actual deleted file copies. The info/ subdirectory holds a one-text-file-per-deletion ledger that records where the file came from and when it was trashed.

Each entry in info/ carries the same name as its file plus a .trashinfo extension — the spec requires the matching name pairing so a restore can find both halves of the deletion atomically. The spec also mandates a precise format for the timestamp inside the ledger: "The date and time are to be in the YYYY-MM-DDThh:mm:ss format (see RFC 3339). The time zone should be the user's (or filesystem's) local time." 1 No proprietary encoding. No binary metadata. The undo drawer is a folder of files, and the ledger is a folder of plain text — the same discipline that lets your notes survive, running all the way down to how the OS records the act of deletion.

A .trashinfo receipt — three lines of plain text

The spec's metadata file is shorter than this paragraph. Run a single command on any modern Linux desktop and the OS will write a receipt you can read with cat — same toolchain you use for your notes, same plain-text format, no special viewer required. The receipt below is the literal output:

# Trash a file, then peek at the metadata the OS just wrote
$ gio trash ~/test.md
$ cat ~/.local/share/Trash/info/test.md.trashinfo
[Trash Info]
Path=/home/lam/test.md
DeletionDate=2026-06-27T17:42:11

Three lines of UTF-8 text — a header, the original path, a timestamp in the format the spec mandates. To restore the file you copy ~/.local/share/Trash/files/test.md back to the recorded Path=, then delete the .trashinfo sibling — the same atomic pair the spec requires, in reverse. Most file managers (Nautilus, Dolphin, Nemo, Thunar) do this automatically through their Restore menu item; the only reason to know the layout is that it lets you write your own restore script in five lines of bash, version it in git, and stop worrying about which file manager ships in the next distro.

The .trashinfo format is also the proof of a quieter claim — when you delete a plain-text note on Linux, the OS uses the same primitive (a small text file you can read) that the note itself was written in. The recovery drawer is built out of the format you trusted in the first place.

How to recover a deleted note on each OS

The same five-step move recovers a deleted note on every desktop — only the trash path changes. macOS keeps its trash at ~/.Trash, Windows at C:\$Recycle.Bin\<SID>\, Linux at ~/.local/share/Trash/ — three names for the same primitive. Most readers stop at step three, with the file restored; the last two steps catch the cases where the OS trash is the wrong drawer.

  1. Open the trash folder. macOS: click the Trash icon in the Dock, or press Cmd-Shift-Period in any Finder window to reveal hidden items, or run open ~/.Trash. Windows: open the Recycle Bin from the desktop. Linux: open Files (Nautilus), Dolphin, or Nemo and click Trash in the sidebar, or cd ~/.local/share/Trash/files/.
  2. Find the file by name or by deletion date. Each OS sorts the trash by date deleted; on Linux you can also cat the matching .trashinfo to read the original path.
  3. Choose Restore (or Put Back) from the right-click menu. This returns the file to its original location, verified against the path the OS recorded at delete time.
  4. If the file is not in the trash, check the cloud service's own trash. Files deleted from iCloud Drive, Google Drive, Dropbox, or OneDrive land in the vendor's trash — not the OS Trash — and each carries its own retention window.
  5. If the cloud trash has also emptied, check your backups. This is the line at which the OS trash story ends and the backup story begins. The two are not the same drawer.

That procedure recovers the file in most "I deleted the wrong note" cases. The rest of this post is the honest list of when it does not.

When the OS trash will not save you

The recovery drawer is real, useful, and bounded. Six limits matter — roughly in the order you will trip over them — and every recovery-conscious reader should know all six. They are not edge cases; they are the structural shape of what the OS actually promises, and the contract attached to every "30-day trash" claim, vendor or otherwise.

The window is finite. macOS local Trash holds files until you empty it manually — unless you have turned on the opt-in 30-day auto-empty in Finder > Settings > Advanced 2. macOS iCloud Drive trash is always 30 days 2. Windows Recycle Bin holds files until the per-drive size cap is hit, then evicts the oldest. Linux trash retention is not mandated by the freedesktop spec — your desktop environment decides whether and when to auto-clean. Do not budget on "always recoverable."

Emptied is not the same as unrecoverable — but it is not a promise either. Once the OS empties the trash, the file is removed from the recovery drawer. Apple says it plainly: "Items that were automatically removed from the Trash are permanently deleted and are no longer available." 2 Forensic data-recovery tools sometimes recover unallocated blocks from the underlying disk, but that is third-party territory with a poor success rate on modern SSDs running TRIM. The OS makes you no promises after the empty fires.

rm does not trash on Linux or macOS. This is the single most common terminal-user mistake. The Unix rm command unlinks the file in place — there is no hop through the trash folder. If you want the recovery-drawer behavior from a CLI, use the spec-compliant tools: GNOME's gio trash <path>, or trash-put from Andrea Francia's trash-cli (4.4k stars, GPL-2.0). The project README says it directly: "trash-cli trashes files recording the original path, deletion date, and permissions. It uses the same trashcan used by KDE, GNOME, and XFCE, but you can invoke it from the command line (and scripts)." 7 On macOS you can install the same idea through Homebrew (brew install trash), or alias rm to a script that moves to ~/.Trash. The point is that the trash spec ships per file manager — your shell does not get it for free.

Cloud sync trashes are separate from the OS trash. Dropbox, iCloud Drive, Google Drive, OneDrive — every vendor sync service maintains its own trash with its own retention window (typically 30 days for consumer tiers, longer for paid). If you deleted a note that was syncing through one of these services, the OS Trash and the vendor's web trash are both candidates and may carry different contents. Check both.

The OS trash is not a backup. A backup is additive — a copy that lives somewhere your live data does not. The OS trash is subtractive — a holding area on the same disk that gets emptied on a schedule. If your disk dies, the trash dies with it. The real recovery story is the 3-2-1 rule for notes, and the trash drawer is the last-30-days mistake-recovery layer that lives on top of it, not in place of it.

Vendor-app trash is not the same as OS trash. Notion, Evernote, Obsidian Sync, and most note apps ship their own 30-day trash UI inside the app's storage. Those windows depend on the vendor continuing to operate the service. The OS trash depends only on the file being yours on disk. When notes are plain files, you get both — the app's UI for casual undo, and the OS trash as the second floor under it. When notes are a vendor's proprietary database, you get only the first.

How this fits the rest of your note-recovery story

The OS trash is one layer in a four-layer recovery stack — and knowing which layer to reach for first is most of the skill. Below it sits the cross-OS plain-text discipline — when your note's created date is a real filesystem timestamp, the trash records that same kind of timestamp when it deletes the file.

One layer up is the backup discipline — the 3-2-1 rule is the story for the disk that dies, the laptop that gets stolen, and the file that left the recovery window. Two layers up is version control — git restore <path> is the deterministic, vendor-independent recovery path if you ever committed the note, and it does not care whether the trash exists. For sync-conflict cases, the recovery story branches into what happens when two devices edit the same note — the cloud service's own trash is the relevant drawer there, not the OS one.

What this means for plain-text notes

A note app that stores your notes as plain markdown files on your own device hands you the entire stack — OS trash for the last-30-days mistake, optional version control for the deterministic path, optional backup for the disaster case. A note app that stores your notes in a proprietary database hands you only whatever recovery UI the vendor shipped.

This is what the file-over-app principle looks like applied to deletion — the trash drawer outlasts the app because the file outlasts the app. Quoting Steph Ango again, from the same essay 4: "Apps are ephemeral, but your files have a chance to last." When you delete a note in a note app that writes plain markdown, the file moves into your operating system's standard trash drawer — the same one every other file on your device uses.

Frequently Asked Questions

The questions below are the verbatim queries readers and search engines bring to this topic — answered with the same primary-source discipline as the body. Each answer is short, extractable, and tied to its OS-level source so a reader can verify the rule independently. Read top-to-bottom, or jump to the question that matches your situation.

I deleted a note by accident. Can I get it back? Almost always, yes — if the note was a plain file and you act before the recovery window closes. Open your OS trash (macOS Dock Trash, Windows Recycle Bin, Linux file manager Trash sidebar), find the file, and choose Restore or Put Back. If you used a cloud-synced folder, the cloud service's own trash is the second place to check.

Where do deleted files go on macOS, Windows, and Linux? macOS sends them to ~/.Trash per user, plus <volume>/.Trashes/<user-id> on external drives 2. Windows sends them to C:\$Recycle.Bin\<user-SID>\ per drive 3 6. Linux sends them to $XDG_DATA_HOME/Trash/ per user (usually ~/.local/share/Trash/), with a files/ subfolder for the actual content and an info/ subfolder for the metadata 1.

How do I recover a deleted Markdown file? Identical to recovering any other file. The trash folder treats .md files the same as .docx, .jpg, or .png. Restore from the OS trash first; if it has emptied, check the cloud service's trash; if both have emptied and you committed the note to git, run git restore <path>.

Does the macOS Trash auto-empty after 30 days? It depends. Files moved to the Trash from iCloud Drive are auto-emptied after 30 days regardless of your Finder settings 2. Files moved to the Trash from your local disk are auto-emptied after 30 days only if you turned on Remove items from the Trash after 30 days in Finder > Settings > Advanced 2. By default, the local Trash holds files until you empty it manually.

What is the $Recycle.Bin folder on Windows? It is the on-disk backing store for the Recycle Bin. Microsoft's documentation calls the user-visible folder a virtual folder identified by the constant CSIDL_BITBUCKET (aliased as FOLDERID_RecycleBinFolder in modern Windows) — "the virtual folder that contains the objects in the user's Recycle Bin." 3 The physical location is C:\$Recycle.Bin\<user-SID>\ on the C: drive, with parallel paths on other drives 6.

How do I recover a file in Linux that I deleted with rm? You probably cannot recover it from the trash — rm does not put files there. Use gio trash <path> from GNOME's command-line interface, or trash-put from trash-cli, instead 7; both write to the same ~/.local/share/Trash/ directory your desktop file manager already uses 1.

Can I get a file back after I empty the trash? The OS makes no promise. Apple's documentation is explicit: "Items that were automatically removed from the Trash are permanently deleted and are no longer available." 2 Forensic data-recovery tools occasionally recover unallocated blocks from the disk, but the success rate is low on modern SSDs running TRIM. If you committed the note to version control, git restore is the only deterministic path back; otherwise, your backup is the next answer.

References


If you want the recovery drawer to be the last line of defense, write the kind of files that get one. When you delete a note in mnmnote.com, the file moves into your operating system's standard trash drawer — the same one every other file on your device uses.

Footnotes

  1. Ramendik, M., Faure, D., Larsson, A., & Lortie, R. (2014, January 2). "The FreeDesktop.org Trash specification, version 1.0." freedesktop.org. https://specifications.freedesktop.org/trash/1.0 Accessed 2026-06-27. 2 3 4 5 6 7

  2. Apple. "Delete files and folders on Mac." macOS User Guide, article mchlp1093. https://support.apple.com/guide/mac-help/delete-files-and-folders-on-mac-mchlp1093/mac Accessed 2026-06-27. 2 3 4 5 6 7 8 9 10 11 12

  3. Microsoft. (2021, March 22). "CSIDL (Shlobj.h) - Win32 apps." Microsoft Learn. https://learn.microsoft.com/en-us/windows/win32/shell/csidl Accessed 2026-06-27. 2 3 4 5

  4. Ango, S. (2023, July 1). "File over app." stephango.com. https://stephango.com/file-over-app Accessed 2026-06-27. 2

  5. Ramendik et al. (2014). Trash Specification v1.0, Introduction. https://specifications.freedesktop.org/trash/1.0 Accessed 2026-06-27.

  6. Microsoft Q&A. (2020). "What is the Recycle bin directory?" Microsoft Learn Q&A #3318913. https://learn.microsoft.com/en-us/answers/questions/3318913/what-is-the-recycle-bin-directory Accessed 2026-06-27. 2 3

  7. Francia, A. "trash-cli — Command-line interface to the freedesktop.org trashcan." GitHub. https://github.com/andreafrancia/trash-cli Accessed 2026-06-27. 2