Macos – Is it safe to manually delete frameworks of unused programs from the Mac OS X /Library/Frameworks/ directory

macmacos

I had to look in the Frameworks folder on my mac (/Library/Frameworks/) to uninstall a program. But now that I’m looking further in the folder, I see some programs that I once installed, but deleted after some time for some reasons.

I am wondering if I can delete the frameworks of these programs as I do not want to reinstall these programs on this mac anymore.

I was reading that frameworks are “a hierarchical directory that encapsulates shared resources” as I was reading on the Apple site. Because I do not know anything about this stuff I do not just want to delete something.

So, my question, is it safe to delete frameworks from unused and uninstalled programs without getting problems with other programs or the computer itself?

Best Answer

If nothing is using them, yes

The .framework files in /Library/Frameworks/ are indeed files that are intended to be shared. For instance, I currently have Mono.framework in my folder, which would be used by all apps built with Mono.

You will not have any problems with macOS if you remove these files, since it has its own frameworks folder in /System/Library/Frameworks (and you shouldn't remove those). So the only risk with removing these files is if an app or service requests it.

Unfortunately, there isn't a good way to find out what apps require what sort of frameworks, so you'll have to use an educated guess. The strategies I can recommend are:

  • Look at the name: One of my frameworks is HPSmartPrint.framework, which I'm quite sure is for HP printers. I have not owned an HP printer in about eight years, so I'm pretty confident that it's not being used.
  • Look at the Date Modified: If something you use regularly is using the framework, chances are good that it's going to try to keep it up to date. I have one framework that was last modified in 2009, and along with the name, I'm pretty sure that it's not used.
  • Use a package viewer: If you have a hunch as to what installed it, you can use a tool like Suspicious Package to examine the files that the package installs. I was fortunate enough to find the .pkg installer online for an old VPN tool I used to use. Running it through Suspicious Package showed that it did indeed create one of the framework files in my Library/Frameworks folder.

Of course, if you do remove a framework that is required by something you use, reinstalling that app should add it back to your computer.

Related Question