|
Hi everyone! I hope that you enjoy this summer.
I want to tell something very personal about myself (some of my readers complain that this blog is too technical). I want to share my secret with you, don't tell anyone ;) I am a secret admirer of trees and nature! I think trees speak with the Universe and can tell us about everything should we listen patiently! Enough secrets (they might be misleading!). Let's get technical! |
Index
How to Speed Up macOS Without Hardware Upgrades
After a while, my macOS computer started to work slower. I have searched for possible solutions to run my computer faster without much latency. We can upgrade our computer storage and install a more powerful processor to speed up macOS, but hardware upgrades are costly and take time. This post instead focuses on three software-only maintenance steps that reclaim disk space and free memory:
- Clear macOS caches in
~/Library/Caches - Empty the Trash
- Free RAM with the
sudo purgecommand
Clearing macOS Caches in ~/Library/Caches
macOS caches are temporary files that apps and the system store to speed up repeat operations; over time they can grow large and consume disk space. macOS user caches live in the ~/Library/Caches folder. In Finder, choose Go > Go to Folder (or press Shift+cmd+G), type ~/Library/Caches, select all subfolders with cmd+A, and move them into the Trash. If you still need a particular cache folder, deselect it first with cmd+Mouse click.
Apple’s own storage-recovery advice leans on Optimised Storage and Safe Mode, which clear certain system caches automatically and let apps rebuild them as needed. Clearing your user caches by hand is a longstanding power-user habit rather than an Apple-documented step. It is safe in that apps simply regenerate what they need, but leave /System/Library/Caches alone, and expect the odd app to feel sluggish on its next launch while it repopulates.
Emptying the Trash to Free Disk Space
To empty the Trash, Control-click (or right-click) the Trash icon in the Dock and choose “Empty Trash,” or open the Trash in Finder and click Empty in the top-right corner. Whatever you empty is gone for good, so a quick glance through it first is not paranoia.
Freeing RAM with the sudo purge Command
sudo purge is a built-in macOS/Darwin command whose man page describes it as forcing the disk cache to be flushed, approximating the “cold cache” state your Mac has right after a fresh boot. Here’s the precise version of what that means: purge clears the file-system cache that macOS keeps sitting in otherwise-idle RAM, which is why Activity Monitor shows more memory as “free” afterwards — it does not reclaim memory a running app has actually allocated. In my experience it is a small, temporary effect, not a fix for a genuinely memory-starved Mac. If one app is hogging RAM, quitting it does far more good than purge ever will.
If you would rather skip the Terminal, third-party tools such as MacKeeper’s Memory Cleaner wrap the same idea in a GUI, for a price. To do it yourself for free, open Terminal (in Applications/Utilities), type sudo purge, and enter your administrator password when prompted — nothing echoes to the screen while you type it, which is normal.
Bash Script to Automate macOS Cleanup
This section is a command-line-friendly version of the steps described above.
To automate the cleanup process, I have written a small bash script, which you can modify and adapt to your needs.
Since macOS Catalina, zsh is the default interactive shell, not bash, but bash itself is still installed — save the script below and run it with bash cleanup.sh and it works regardless of which shell your Terminal opens into.
Be cautious to keep the files you need: rm -rf * permanently deletes the contents of the cache folder with no confirmation and no Trash recovery.
# Go to the ~/Library/Caches folder
cd ~/Library/Caches
# Remove everything there
rm -rf *
# Empty the Trash
rm -rf ~/.Trash/*
# RAM and caches clean up
sudo purge
Conclusion: Speeding Up macOS via Software Maintenance
These three software maintenance steps — clearing ~/Library/Caches, emptying the Trash, and running sudo purge — reclaim disk space and clear out stale caches on a slow Mac, at no cost and without a trip to the Apple Store. None of them will turn an ageing Mac into a new one, but together they buy you real breathing room. Dig into the references below for the fine print. Let me know if you have new blog topic ideas or suggestions!
Did you like this post? Please let me know if you have any comments or suggestions.
Posts about development tools and Python codingReferences
1. Go directly to a specific folder on Mac – Apple Support
2. Delete files and folders on Mac – Apple Support
3. Free up storage space on Mac – Apple Support
Enjoyed this? Get more like it.
Weekly notes on AI tools, Python, and what I'm actually building — plus two free gifts: the 15-page Fantastic AI: The 2026 Toolkit and a Git Commands & Contribution Workflow Cheatsheet.