2

I have deleted the file com.apple.HIToolbox.plist from /Library/Preferences/ by mistake. I have a copy of the file saved. I hoped the file would be reconstructed after reboot, but that didn't happen. A file with the same name in ~/Library/Preferences/ was reconstructed, but not the one in /Library/Preferences/.

Can I somehow make reconstruct this file?

I copied the saved copy to /Library/Preferences/ but it has different file permissions. In particular I had to change the owner to root, and there were some additional extended attributes. I tried to remove the extended attribute com.apple.provenance but the command xattr -d ... simply doesn't do anything.

3
  • Why did you want to delete this file? Was it taking a lot of space?
    – Solar Mike
    Oct 29, 2022 at 20:03
  • I was installing custom keyboard layouts and wanted to edit the file, and I couldn't, even with sudo, so I overwrote it with a copy of the edited file.
    – Kolja
    Oct 29, 2022 at 20:13
  • 2
    My com.apple.HIToolbox.plist (unchanged since 1st created 20191217) does not have any xattrs. From a web search: the com.apple.provenance is new and nobody know what it is!
    – Gilby
    Nov 6, 2022 at 8:25

1 Answer 1

1

You could always reinstall the Mac operating system if you don't have a Time Machine backup. Reinstallation won't remove data from your Mac.

  1. Restart the Mac and press and hold Command (⌘)-R until you see an Apple logo.

  2. Select Reinstall MacOS from the menu. If you have a Time Machine backup you could choose that here instead.

2
  • I followed your instructions to reinstall the OS, however I had not deleted the file prior to the reinstall. The file in question was not reconstructed, which I noticed because the attributes of the file did not change (and they should have changed).
    – Kolja
    Oct 29, 2022 at 21:33
  • 1
    @Kolja Most likely because it is not included directly in the macOS install. I see that my com.apple.HIToolbox.plist 17-Dec-2019 (when I last did a clean install) and not been modified since even though I am not using macOS 13.
    – Gilby
    Nov 6, 2022 at 8:21

You must log in to answer this question.

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