I bought a MacBook Air specially chose the high configuration version. The hard disk space was 128G (Antique machine in 2011). It was used well in the first 1-2 years. Later, it was found that it was more and more incompetent. In order to make space as much as possible, almost all the photos, videos and PDF documents were moved to the cloud, and tools such as cleanmymac were often used to clean up. However, it was still found that some of the space had been damaged Since there is no better solution, write a tool to clean it up.
The content of the first few sections is a relatively tedious introduction to the technology. Students who are not interested in it can jump directly to the section on the use of tools
App’s favorite directories
There is a big difference between the Mac and windows operating systems. Most apps do not have an installation program. Generally, the download is a DMG file, and then the app is directly dragged to
application programThe directory is OK, so it gives people the feeling to uninstall, that is to drag the app to
a wastepaper basketThen empty it. It would be a big mistake to do so. Even the simplest app will leave more or less memorials in the following directories, which are generally:
If a program is passed
pkgMode installation, or request administrator permission during the first run. Generally, some commemorations will be left in the following directories:
The above is just a part of the list. Different apps will install some files in other directories due to their needs. For example, word processing software will install fonts under / library / fonts, and some extension components will be placed under / library / scriptingadditions.
Due to the limited space, I can’t introduce all the contents of the catalogue one by one
This directory can be said to be the most important file directory for apps. Some apps themselves are not big, but they need a lot of supporting components and content, especially software that uses third-party plug-ins and caching network content, such as mine
DashIts size is only about 24MB. However, due to frequent browsing, it caches a lot of network content, making its support directory reach the1.37GB! As you can imagine, if you just throw the app into the wastebasket, you will hardly save any space.
The app settings are saved in this directory. Generally speaking, software with a small size has its own configuration information. Although the files stored here do not take up a lot of space, it is still beneficial to clean them up. For example, some apps can’t work normally, even if they are unloaded and reloaded. Usually, the configuration file is wrong. It will be better to clean up and then reload effect.
This directory is the most important directory for the software downloaded from the app store. Due to Apple’s restrictions, the app store software is located in the
sandboxEach software has its own complete space in the sandbox. For app, it thinks it is running in a normal directory system, but it is not. The operating system relocates the read-write position to the sandbox.
When you uninstall the software, it’s just a matter of
LaunchpadClick the cross to delete. I don’t know how much space has disappeared inexplicably. I used to unload Netease cloud music in this way, but later I found that 417mb of space was missing
Random boot mode on MACone ofStudents who are familiar with OS X operating system should immediately think of it
launchctlThis is the place to store the startup configuration file. Most apps only write startup information here. It’s easier to please God than to send God. To send God, you have to use a third-party tool or manually clean it yourself. In addition, there are some differences between launchagents and launchdaemons. Although they are both started randomly, please see for detailsLaunchAgents VS LaunchDaemons
Overview of this tool
I’d like to recommend the apple script that comes with the MAC system. This is the Swiss Army knife on the Mac, which can be compared with the PowerShell on windows. My final cleaning work in this software is actually completed through Applescript. For example, the cleaning work needs to close the target program first. How do you plan to implement the program yourself? Enumerate system processes and kill? You can do it very gracefully with Applescript. For example, you open Safari, open a terminal window at the same time, and then type in the terminal
osascript -e 'quit app "safari"'
The origin of the name
From the movie “total recall” of the same name, after a virtual experience, Quaid suddenly found that he was not an unknown worker, but a super agent. What was he? Maybe the real self will never be found back, but at least not so muddled now.
I would also like to borrow this meaning to show that even through hard cleaning, it can not be restored to the original state, but at least it will not be so bad.
Use of tools
There seems to be nothing to say about this. I just compared the cleaning effect with cleanmymac. At least, in most cases, I feel good.
Comparison of unloading Baidu cloud
You can clearly see that cleanmymac did not find the application support directory of Baidu cloud. In addition, it only found the login key, but not the startup key and startup file.
Total recall not only found all the contents of cleanmymac, but also found application support, which has a space of 1.14MB. In addition, it also found the startup item and startup file in launchdeamons, and found that
com.baidu.netdiskmac.BDYunFinderInstallerSuch a ghost
Compare uninstalling apps on the app store
Cleanmymac lists a lot of things that are really frightening. When you look at them carefully, you can see that they are all
Containers\com.tencent.xinWeChatThe subdirectories in this directory are also filled with a system temporary directory (the system temporary directory will be empty after the computer restarts). When you uninstall, you just need to delete the sandbox directory and everything will be fine.
One kind of software is released in the form of package, which has complicated installation steps, such as Microsoft Office 2016 for Mac. For this kind of software, there are more contents to be analyzed, and it is planned to uninstall and integrate the package after improvement
The software interface is very simple, one is not good at playing CSS and HTML layout, the other is the first time to use react, front-end experts can give me some advice?
“In depth analysis of Mac OS X & IOS operating system” is the best choice for people who want to understand the MAC system, and it is worth having
Information Property List Key ReferenceThe most important file in app Info.plist It is necessary for development
ElectronIf you’re going to build a desktop app with electron, you have to start here
ReactThe official website of react, although my interface is very ugly, that’s because I don’t know how to play CSS yet