If your Mac says that the file is in use
- Quit any app that you were using with the file, then empty the Trash.
- If that doesn't work, the app might have one or more background processes that are using the file. Restart your Mac, then empty the Trash.
- If that doesn't work, you might have a startup item or login item that is using the file. To temporarily prevent such items from opening automatically, start up in safe mode by holding down the Shift key while your Mac starts up. Then empty the Trash and restart your Mac normally.
If you can't delete the file for other reasons
- Start up from macOS Recovery by holding down Command-R while your Mac starts up.
- When the macOS Utilities window appears, select Disk Utility and click Continue.
- In Disk Utility, select the disk that contains the file that you want to delete. Then use the First Aid feature of Disk Utility to repair that disk.
- Quit Disk Utility, then restart your Mac and empty the Trash.