# Settle a deleted file that a synced folder holds (/use/settle-a-held-delete)

Bin or keep the item of a file you deleted from a synced folder, when Marfa holds the delete because it can't tell it from a move.



On a computer with more than one synced folder, Marfa can't always tell a file you delete in Finder or with `rm` from one you moved into another folder. **It keeps the item and holds the delete until you settle it.** No later sync or pull ends the hold, even when a missing folder comes back. A push says why:

```text
Deletion of Bills/water.pdf is on hold because another folder is on this computer, at /Users/sam/Documents/Work, so Marfa cannot tell its delete from a move into it. `folders held` settles it
```

A file can also be held because it's a hard link, two files elsewhere could be it, or its own path couldn't be read when you [confirmed a large removal](/use/fix-a-folder#a-large-removal-waits). `marfa folders status` lists each one `held`, flagged `unsure`.

## See what waits [#see-what-waits]

```bash
marfa folders held ~/Documents/Home
```

Output:

```text
1 held file(s), which `folders held --trash` or `--keep` settles
Bills/water.pdf another folder is on this computer, at /Users/sam/Documents/Work, so Marfa cannot tell its delete from a move into it
```

## Bin or keep the item [#bin-or-keep-the-item]

Look in the folder the reason names. If you deleted the file, bin its item; if you moved it, or want it back, keep the item:

| To | Run |
| - | - |
| Move the item to the bin | `marfa folders held ~/Documents/Home --trash Bills/water.pdf` |
| Keep the item | `marfa folders held ~/Documents/Home --keep Bills/water.pdf` |
| Keep it and write the file back now | `marfa folders held ~/Documents/Home --keep Bills/water.pdf --write-back` |

* **`--trash` asks first.** A script, or `--json`, adds `--yes`. If another folder you can read now holds the file, its item stays and the answer says it `moved`.
* **`--keep` lets the file go from this folder** and keeps the item. While the folder's query holds the item, a later sync writes its file again.
* **`--write-back` writes the file at once,** unless another item's file has taken the path: then it writes nothing and the file stays held.

## When the other folder is gone [#when-the-other-folder-is-gone]

A folder remembers each other folder it has found on the computer, even after `marfa folders remove` takes it off the list. **While a remembered folder can't be reached, a delete beside it is held,** because the file may be in it, on a volume that isn't mounted. Nothing tells a folder gone for good from an unmounted volume, so you end the memory:

```text
Bills/water.pdf the folder /Volumes/Archive/Work cannot be reached, and the registry no longer lists it; if its volume is not mounted, mount it, and if it is gone, `folders forget` it
```

If the volume is only unmounted, mount it and settle the file as above. If the folder is gone for good, forget its path as the reason spells it:

```bash
marfa folders forget /Volumes/Archive/Work
```

Output:

```text
Folders that remember /Volumes/Archive/Work or have a deletion on hold for it (1)
  /Users/sam/Documents/Home would reconsider 1 held deletion(s). The next sync can send these items to the bin if this was the last other folder:
    Bills/water.pdf
Forget it? [y/N] y
/Users/sam/Documents/Home no longer remembers /Volumes/Archive/Work. Its next pass reconsiders these held deletions:
  Bills/water.pdf
```

* **It shows before it changes anything.** Off a terminal, or with `--json`, it only shows unless you add `--yes`.
* **The next sync decides each released file again:** its item moves to the bin where no other synced folder is on the computer, and the file is held again where one is. A delete that also waits on another gone folder stays held, its reason naming what's left, until you forget that one too.
* **Forgetting changes nothing else.** It bins no item and takes no folder off the list. A folder it can't read or change is named and left alone, and the command exits 3.
* **It refuses a path where something stands,** such as a directory with files in it or one it can't read, which may still be the folder. Unmount the volume, or remove what's there or make it readable, first. An empty directory, or one holding only what the computer writes by itself, such as `.DS_Store`, counts as empty.
* **A listed folder is never forgotten.** Where the reason says `folders remove` it, run `marfa folders remove` with its path first, then `marfa folders forget`.

Forgetting doesn't release a delete held by Marfa 0.0.113 or earlier, whose reason ends "settle this file with `folders held`": bin or keep its item as above.

A hold also ends when a file comes back at its path, its item is binned or purged elsewhere, or you forget every gone folder it waits on. [How a folder treats files](/reference/folder-rules#deleting-moving-and-renaming) has the rule.
