2

I must have run an "rm -rf *" command in my root file system (noob mistake I know) as all my files and apps on my mac were deleted, but the computer was still functioning. I've continued working on the mac, and noticed there is no /System/ folder, so I'm thinking maybe I deleted the system folder. Is there a way to restore the file system but keep the apps and files I'm working with?

  • You need to get an external harddrive and enable time machine. It's only a matter of time until you loose all your data on your startup drive. I recommend you get a backup before messing with your machine any more. – historystamp Dec 19 '18 at 1:03
  • btw: control + c will quit a terminal command. – historystamp Dec 19 '18 at 1:05
  • It's not so easy to delete /System, have you disabled SIP in the past? – nohillside Dec 19 '18 at 5:40
2

You can boot into macOS Recovery by pressing Cmd-R at startup, from there you can reinstall macOS. This should leave your files intact, it's nevertheless not a bad idea to do a backkup first.

Apple has described the procedure in detail in https://support.apple.com/en-us/HT201314 and https://support.apple.com/kb/HT204904.

  • I have done this earlier but if you are really worried about this approach, do backup your files. – williamtell Dec 19 '18 at 20:03

You must log in to answer this question.

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