> For the complete documentation index, see [llms.txt](https://tk233.gitbook.io/notes/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://tk233.gitbook.io/notes/tools/ubuntu/solving-the-.nfsxxx-file-cannot-be-deleted-issue.md).

# Solving the .nfsXXX file cannot be deleted issue

First, list the process that is holding the file by

```bash
lsof +D your/path/
```

It will show a bunch of information. The second column is the process ID.

Then, we kill the process by

```bash
kill -9 pid
```
