Where does the upgrade to macOS Catalina and Big Sur move root "/" directory files?

After updating to macOS Catalina, all the folders I had saved in the root directory, "/", were missing.

I read that the system is now read-only, but didn't see a notice on where previous files have gone.

Are they on the system or do I need to restore them from backup?


This took me a long time to figure out, but any file that was formerly at, e.g., /my-cool-directory was moved to /Users/Shared/Relocated Items/Security/my-cool-directory.

I ended up moving the directories by running this command from the terminal:

cd "/Users/Shared/Relocated Items/Security"
sudo mv my-cool-directory ~/
# enter your system password when it asks you

After doing that, my file is then located in my home directory, e.g. ~/my-cool-directory

After a subsequent Mac OS X update, the files may be in /Users/Shared/Previously Relocated Items.


You can use the file /etc/synthetic.conf to map your old folder to a new virtual folder on the root directory. If the file doesn't exists, just create it with sudo :

sudo nano /etc/synthetic.conf

Add the folder you want to use in the root directory, and the directory you want to mount on.

Ex:

my-cool-directory  /Users/Shared/Relocated Items/Security/my-cool-directory

Finish by rebooting your mac.

PS: Be careful with your synthetic.conf file. A colleague emailed the content of his file and it had a space between the virtual name and the path. Your system will simply power-off about 15 seconds into the boot process.

You must have only one tab character only between my-cool-directory and /Users/Shared/Relocated Items/Security/my-cool-directory.

You can find more infos with man synthetic.conf