Hacker News new | past | comments | ask | show | jobs | submit login
Why did I use Tauri to build PrettyClean, a macOS disk cleanup tool (prettyclean.cc)
35 points by aiyanbo 11 months ago | hide | past | favorite | 14 comments

"I used CleanMyMac to clean my disk thoroughly, but there is not enough space. After analysis, it was found that the development tools and the compilation results left over from many projects took up a lot of disk space. At that time, I wrote a shell script to clean up, and as a result, 30GB of disk space was recovered, and the system was successfully upgraded."

This is weird. With CleanMyMac, I can easily scan subfolders and their sizes. If the size is, say > 3 GB, I immediately check it. Certain folders like homebrew or Android Studio cache are safe to be deleted. I'dl like to know cases where CleanMyMac may fail.

I've always been a bit suspicious of clean apps for mac, maybe because there was a notorious scammy one that pushed doddgy adverts everywhere.

There's now a pretty good mac clean up tool built in to macos. From the apple menu: About This Mac -> Storage -> Manage...

It breaks down the file system in various ways, one of which is developer files where you can clean build folders and caches, uninstall SDKs and a few other things

Many build tools write caches to hidden folders in the home directory. You can see them with ls -a.

e.g. .npm, .sbt, .gradle, .cargo etc.

The compilation result of the code is often in the root directory of the project, such as maven, the sbt project will be written to the target directory, and the cargo project will be written to the build directory.

The cache files mentioned above cannot be scanned and cleaned by CleanMyMac.

Why should I use Tauri to build PrettyClean, a macOS disk cleanup tool? Why is Rust the best choice? What Tauri features did I use to build PrettyClean?

"The size of the installation package is very small. The size of the PrettyClean installation package is less than 5MB."

Hell yes!

That’s a joke, right? Why should a disk sizing tool be more than a few hundred KB?

This comment is a joke, right? Are you seriously thinking users would rather open the terminal and type in some commands instead of downloading a GUI app just to save 5MB?

Yes. Back in the day 5MB was reserved for highly important programs due to size limitations - it's that knowledge which many users of this forum exemplify and why we're continuing to lead the software development community.

Any space wasted on unnecessary things like graphics and animation that detracts from the functionality of the program is useless.

Back in the day these were command line programs that did not have to include icons for hidpi screens. Those are huge!

Whats the point of having GBs of ram and TBs of disk if you are never going to use it?

OmniDiskSweeper: my favorite app for this is a native Mac application. That weighs in at about 24MB. This is quite a bit leaner. Don’t know if it’s any good but for non technical users the size of this app is about as low as you can go without dropping into a terminal.

All the super safe(tm) Rust code to wrap system("ls -l --block-size=M")

Closed source?

Seems to be just a list of files in certain filesystem locations known to be removable caches. Should be able to write it in a day with some basic Unix FS knowledge and Swift UI.

Applications are open for YC Winter 2024

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact