4

I'm using macs since 8 years now and have a computer science background. I know, that when installing software, OSX is not as nasty as windows. Meaning, instead of dealing with dll libraries and stuff that is installed somewhere in the system, apps in osx usually - by convention - should only use folders like "Application Support" and "Preferences" for their stuff.

Since, there are apps, that don't follow conventions I'd like to know, what structure is encouraged by the system and what not. So I can know for example which folders in ~/Library/ I can delete without sacrificing system stability.

For example in my user-lib folder I had stuff like "MonoAndroid" from which I know where they came from (xamarin) and from which I know whether I want to delete them, because I'm not using the app assosiated with that anymore.

I suppose that the user directories are not that of a big problem with deleting stuff, but there is always this one app, that keeps files also in higher dir's (like said xamarin).

Additionally, I want to clean up a friend's mac, and since I was not using that, I'd like to have and intuition of "what belongs where" and what not.

Is there a guide or something? Or a good documentation about where stuff should go and which folders should not been touched? I searched for that, but did not find anything good, really. Until now I have based my knowledge about osx on knowledge about unix and half knowledge from usage.

1

Unix knowledge will help a lot as long as it is not following Linux or other conventions exactly (Linux is Unix like whilst OSX is a Unix based on BSD)

Some description is given by Apple in this developer documentation (The link does not seem to be exact but look for the OSX part not IOS) There are several sections which are too long to list here.

One is for UNIX-specific directories but I am surprised to see "/usr—Contains non-essential command-line binaries, libraries, header files, and other data." They might be non-essential but removing this will break a lot - you should only change things in /usr/local

Another is The Library Directory Stores App-Specific Files The main sections are

  • Application Support - app data files except those associated with the user’s documents
  • Caches - app-specific support files that your app can re-create easily.
  • Frameworks - frameworks that must be shared by multiple apps
  • Preferences - app-specific preference files used the NSUserDefaults class or CFPreferences API

Treat this as a guide as many (Most?) apps do not follow this 100%.

Mono has in the past put things in the wrong place e.g. in /usr/bin Other apps use Preferences not via the API. Other apps use directories in ~/Library itself e.g. Mail.app

  • Thank you very much for this concise and helpful answer! – ruffy Mar 1 '14 at 23:45
  • I was (not?) astonished to see the sentence "All content in this directory [Application Support] should be placed in a custom subdirectory whose name is that of your app’s bundle identifier or your company." but almost no application following this rule. At least I know now :-) – qwerty_so Jul 14 '15 at 13:57
  • @ThomasKilian I think that comment was not in earlier versions - but was the obvious thing to do from the beginning - but also having read Windows app guidelines a lot of (most?) developers don't seem to be able to read – Mark Jul 14 '15 at 14:10
  • When I came to that point now I thought it was obvious that one should use the bundle identifier and with sandboxing this convention should have made it to become a hard constraint. But I know Windoze is even worse ;-) – qwerty_so Jul 14 '15 at 14:37

You must log in to answer this question.

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