Macos – Override “resource is busy” when rm on Mac OS X Terminal

macos

When I try to delete a file

sudo rm -rf filename

I get spit back:

rm: filename: Resource is busy

How can I override this? I know for a fact that the resource is not busy. I just want to delete it!

Best Answer

You cannot override this behaviour.

The operating system states that it is busy. The operating system is probably correct. The error message could be for these reasons:

  • the file is actually being used by another process
  • there is a problem with your file system

As you wish to delete the file, my suggestion has been to boot the machine from a linux image, mount your file system and delete the file.

Related Question