← Back to Justin Williams

Removing Unremovable Files after Upgrading to macOS Catalina

Against the better judgement of my own common sense, I decided to update my iMac to the macOS Catalina beta recently. One of the major internal changes in going from Mojave to Catalina is the transition to a read-only System volume. During this process, I ended up with a folder on my desktop of files that the upgrade was unable to handle. Most of these files seemed innocuous, and I just deleted them. There was one folder, however, that I couldn’t delete because the system claimed it wasn’t empty. Blowing it out via the Finder or the Terminal was a fruitless task.

In the interest of saving you time if you run into this scenario, these are the steps I took to solve my issue.

  1. Reboot your Mac into Recovery Mode. Authenticate your user account if required.
  2. From the menu bar, open the Terminal application.
  3. Disable System Integrity Protection and reboot: csrutil disable; reboot .
  4. Once your Mac reboots (and assuming it's still not in recovery mode), open the Terminal app.
  5. You need to mount the new file system as read-write temporarily so we can blow the folder(s) away: sudo mount -uw /. This is temporary, and rebooting will revert back to the safer read-only variant.
  6. Delete the files you want to purge via the rm command. You’ll probably need to use sudo.
  7. As a last step, you need to re-enable System Integrity Protection. To do that, reboot back into Recovery mode.
  8. From the Recovery Mode menu bar, open the Terminal application: csrutil enable; reboot

Once the reboot completes, your Mac should be back to the expected state, just with a few less zombie folders. You can verify SIP is active by opening Terminal and executing the csrutil status command.

Filed under

Justin Williams

Independent software developer based in Denver, Colorado. Writing about building small products since 2003.