Why does “device or resource busy” stop me from unmounting on Linux?

Unmount fails because a process still has a file open on that filesystem. Find the holder, stop it, then unmount cleanly.

LinuxProcessesdisktroubleshootinglsofDiagnosticsmountMedium risk
Run fuser -vm on the mount point to see which process is holding the filesystem, then close or stop that process and try the unmount again.

What this covers

Linux only refuses to unmount when something is still using the filesystem: a shell whose current directory sits inside the mount, an editor or file manager with a file open, a media player, or a background sync or indexer. The kernel will not pull the filesystem out from under them. The fix always has the same shape — identify the holder, stop it, retry — and it never requires a reboot.

Symptom

?The unmount command answers with “target is busy” or “device or resource busy”, the desktop's eject button says the volume is in use, and the device is still listed in the mount table even though you closed the file manager.

Find the process holding the mount point

This is the first move because the error is not about the drive, it is about something still using the filesystem. The check lists the PIDs, the owning user and the exact files that are open inside the mount, which lets you tell a stray shell sitting in that directory apart from a real daemon you should leave alone. If it prints nothing at all, the blocker is not a plain open file and you can move to the next diagnostic.

LinuxFix 'umount: target is busy'Low riskStep 1

fuser -vm shows the processes holding files open on a mounted device; close them (or stop your own shell sitting in that directory) so umount succeeds.

Command
$ fuser -vm /media/usb
▾ Undo
Undo
$ null

Check for open-but-deleted files

A file that was unlinked still keeps the filesystem busy as long as a process holds an open descriptor to it, so a closed-looking app or a rotated log can be the invisible holder. If the output shows paths underneath your mount point, that entry is your blocker and the unmount will keep failing until that process exits or is stopped. No matching entries means you can go straight to clearing the process.

When df says full but du disagrees, open-but-deleted files are the usual culprit; lsof +L1 lists them with the process holding each.

Command
$ sudo lsof +L1

Stop the process — gently first, then hard

Send the ordinary termination signal first so the program gets a chance to flush buffers and close its files cleanly; only if it is still alive a few seconds later should you escalate to the forced signal. You know it worked when you re-check the mount point and nothing is listed any more, which is exactly what frees the filesystem. The hard signal can throw away unsaved writes on the mounted device, so keep it as the last resort.

Terminate a specific process by PID: first with a plain kill (SIGTERM), then with kill -9 (SIGKILL) only if it refuses to exit.

Command
$ kill 12345

Kill by name when you do not want to hunt PIDs

This is handy when the holder is an application that keeps respawning child processes, or when several of your own shells are parked inside the mount and you would rather not stop them one by one. Matching on the name ends every process with that name in one shot, which is also its risk: spell it carefully, because a sloppy pattern can take down unrelated programs. Confirm the same way as before — re-check the mount point and it should report no holders left.

LinuxTerminate Processes by Name with pkillLow riskStep 4Optional

Use pkill to send a termination signal to every process whose name matches a pattern — no PID lookup needed.

Command
$ pkill firefox
!A forced kill can discard unsaved writes on the mounted device, so save your work and close apps first and use the hard signal only as a last resort. Never mass-kill system services or processes you do not recognise; check who owns the process before you end it.

How to confirm it worked

Run the unmount again on the same mount point. Success means no error and an exit status of 0, the device disappears from the mount table, and its activity light stops blinking — only then is it safe to unplug.

Undo everything

Every command above can be reverted. Run these in order to undo all of it.

Undo everything
$ null

Review before running — some steps may not be independent.

Sources

Last verified: 2026-09-22

Related guides