`git fetch --prune` deletes the local *references* to upstream branches (i.e. entries in `.git/refs/remotes/`), but the local *branches* that tracked them (i.e. entries in `.git/refs/heads/`) are kept.