3

The Problem

My Mac has received a new Relocated Items folder after every OS update since March 8th, 2020. This was around the time I upgraded to Big Sur I think. If I delete the shortcut, it'll just come back after the next OS update.

I have seen several threads related to this issue, but none so far have been particularly helpful in solving the actual problem.

Most threads say this can be simply deleted and ignored. However, I am getting this Relocated Items after every update, which seems unusual since I'm not modifying the files between each update. If I delete the shortcut or folders in the parent folder, they will just reappear after my next system update. So far I have had to live with the shortcut always being on my desktop, which is particularly unhelpful as I'm no longer checking it to see if anything actually important will go there, it is just taking up space. I just checked and I now have 20 "Previously Relocated Items" folders, all with the same contents.

Therefore, I'm hoping to move beyond just ignoring the files, and instead actually resolving the underlying conflict(s) to stop this file re-creation from happening.

The Relocated Items

The folder tree inside the many Relocated Items folders all contains three files under Configuration:

  • /private/etc/groups.system_default
  • /private/etc/paths.system_default
  • /private/etc/shells.system_default

Using some research from other threads, I ran a diff comparison these three files to their matching files in /etc (without .system_default). The differences vary between the files.

Groups

Unlike paths and shells, the groups.system_default doesn't have any changes that I recognize. That said, this is also seemingly the most common file found in Relocated Items. The only difference between the two groups files is that the /etc/groups file doesn't have the _trustd:*:282:_trustd line.

Will adding this line into the /etc/groups file prevent this "Relocated Item" from happening on each update, and is it safe to do this?

Paths and Shells

The paths.system_default file is the same as /etc/paths, but /etc/paths also has another directory: /Users/<username>/platform-tools. This I recognize to be the Android platform tools that I installed at one time.

Similarly, shells.system_default is missing the /usr/local/bin/bash line, but that line is still in /etc/paths. I do remember after an upgrade having to switch from zsh back to BASH, so this makes some sense.

What I don't understand is that in both of these cases, the updated files are still in their normal locations (/etc/paths and /etc/shells), but the files in Relocated Items are missing the changes that I made. My understanding of Relocated Items is that it is a backup changes I made that were replaced by macOS, but this seems to be the other way around.

What should I do in this case to prevent these two unneeded Relocated Items files? I would like to keep platform-tools in my PATH, and also to continue using BASH. Do I need to remove those changes from the /etc/paths and /etc/shells, and re-add them some other way?

3
  • Your understanding is incorrect. An update installer does not replace files you have changed, and it puts the files that would have been installed in Relocated Items. Sep 24 at 15:30
  • @mark Ahh I see, you are correct. I got confused because the PDF describes Relocated Items as: "configuration files were modified or customized by you, by another user, or by an app. The modifications may be incompatible with the recent macOS upgrade. The modified files are in the Configuration folder, organized in subfolders named for their original locations." But what I missed was in the paragraph just below that: the files ending in system_default have the inverse behavior, and "is provided to demonstrate what the Apple supplied version of this file would look like."
    – edude123
    Sep 25 at 22:14
  • I found a related post that seems to more specifically answer my question -- guess I didn't use quite the right search keywords when researching at first. Here is the related thread: link
    – edude123
    Sep 25 at 22:23
0

The "Relocated Items" folder gets created automatically with each update. It includes a short text/PDF file explaining the reasoning behind it.

For /etc/paths, you can create entries in /etc/paths.d to prevent overwrites. There is nothing similar for /etc/shells though (but then /etc/shells doesn't get overwritten in an upgrade).

0

For my case, with my improved understanding of what is happening with these files (thanks to the other answers), the following steps seemed to resolve the conflicts:

  • groups.system_default: Add in the OS-made change to /etc/groups
  • paths.system_default: Delete my edit made there and make the changes to the PATH in another way (either in /etc/paths.d, or using .bash_profile).
  • shells.system_default: Delete my edit made there. chsh will still allow you to switch the shell without having that line in /etc/shells, and in my case the shell change I had made prior was not undone by removing the line.

Thanks all for their guidance!

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .