Speed Up Your Slow MacBook with Terminal Commands
By TinyRoi CTO • Time to read: 6 min
Last updated: July 15, 2025
Learn how to speed up your slow MacBook using simple Terminal commands tailored for developers. Boost performance now!
Your Old MacBook Can Still Come Back from the Dead (Even If It’s Running Slow)
If you’re like many developers or tech pros, you probably rely on an older MacBook that’s been feeling slower lately. Maybe apps lag, Docker containers crawl, or you’re juggling VSCode, local Postgres, and dozens of browser tabs—all while wondering why your MacBook seems stuck in molasses.
Before you consider shelling out for the latest hardware, know this: your MacBook can be fast again—if you know the right Terminal commands to optimise its performance.
This guide walks you through practical, no-fluff command-line tips to speed up a MacBook running slow, designed for techies who prefer solving problems with precise CLI tools rather than just rebooting or closing apps.
🔍 The 5 highest-impact ways to optimise your old MacBook
1. Stop Spotlight indexing (impact: 9/10)
Spotlight often silently causes major CPU and SSD usage spikes, especially after macOS upgrades, contributing heavily to why your MacBook might be running slow.
sudo mdutil -i off /
Or scope it to just dev folders:
sudo mdutil -i on ~/Projects ~/Documents
✅ This simple Terminal tweak can reduce background I/O by about 20%, significantly boosting your MacBook’s responsiveness. Give it a try and let us know if it helps speed up your slow MacBook!
2. Kill UI animations & Dock effects (impact: 8/10)
macOS animations eat up CPU and GPU resources, which can slow down older MacBooks. Run these commands in Terminal to kill unnecessary visual effects and restore snappy UI performance:
defaults write NSGlobalDomain NSAutomaticWindowAnimationsEnabled -bool false
defaults write -g NSNavPanelExpandedAnimationEnabled -bool false
defaults write -g QLPanelAnimationDuration -float 0
defaults write com.apple.dock expose-animation-duration -float 0.1
defaults write com.apple.dock mineffect -string \"scale\"
defaults write com.apple.dock autohide-delay -float 0
defaults write com.apple.dock autohide-time-modifier -float 0.1
killall Dock
✅ These Terminal commands can reduce CPU usage by up to 15%, making your slow MacBook feel much faster.
3. Free inactive RAM (impact: 8/10)
When your MacBook starts to run slow due to memory pressure, manually flushing inactive RAM can help:
sudo purge
✅ Essential for MacBooks that run heavy Docker or development workloads.
4. Manually clear caches (impact: 7/10)
Accumulated caches can cause slowdowns. Use Terminal to manually delete these files and free up gigabytes of disk space:
rm -rf ~/Library/Caches/*
rm -rf /Library/Caches/*
✅ Clearing caches reduces swap usage, often resulting in a noticeable speed boost for your slow mac.
5. Disable rubberbanding & autocorrect (impact: 6/10)
Minor but effective Terminal commands to cut down on CPU overhead during scrolling and typing:
defaults write -g NSScrollViewRubberbanding -bool false
defaults write -g NSAutomaticSpellingCorrectionEnabled -bool false
✅ Small wins that help a MacBook running slow feel more responsive in day-to-day coding.
6. Monitor resource-hungry processes with Activity Monitor (impact: 7/10)
Open Activity Monitor to identify apps or processes consuming excessive CPU or memory that may be causing your MacBook to run slow.
You can launch it from Spotlight or via Terminal:
✅ Spotting and quitting resource hogs can immediately improve system performance without deep tweaks.
🛠 Additional Terminal Tweaks to Improve MacBook Performance
-
Run maintenance scripts manually:
sudo periodic daily weekly monthly
✅ Forces log rotation, clears receipts.
-
Switch to Brave: ~20% less RAM than Chrome. Optimised compositing for macOS.
-
Trim browser tabs & disable extensions: Cuts context switching overhead.
🧮 Trade-offs & legitimate debates
Optimisation | Pros | Cons / nuance |
---|---|---|
Stop Spotlight | Big CPU + SSD relief | No global file search |
Kill UI animations | Faster UI feel | Less "premium" transitions |
Frequent purge |
Immediate memory drop | Reloads file caches from disk |
Manual cache clears | Disk savings | Thumbnails rebuild later |
Real edge case:
Note: Design teams who rely on global asset searches may want to keep Spotlight partially enabled, but engineering teams often see big gains from disabling it.
⚡️ TL;DR: How to optimise your old MacBook
- Stop Spotlight indexing: Stop Spotlight indexing to reduce CPU and SSD pressures that can slow your mac down
- Kill Dock & window animations: Disable Dock and window animations for a snappier UI
- Flush inactive RAM: Purge inactive RAM to free memory after heavy workloads
- Clear caches: Reclaim disk space and reduce swap usage
- Disable rubberbanding & autocorrect: Turn off rubberband scrolling and autocorrect for small CPU savings
✅ These macOS Terminal commands and performance tuning tips will help you speed up your old MacBook running slow, extend hardware lifespan, and delay costly upgrades.
FAQs
How can I speed up my slow MacBook using Terminal commands?
You can speed up your slow MacBook by using several Terminal commands such as disabling Spotlight indexing with 'sudo mdutil -i off /', killing UI animations to reduce CPU and GPU load, purging inactive RAM with 'sudo purge', clearing system caches, and disabling rubberband scrolling and autocorrect. These CLI tools help optimize your MacBook’s performance effectively.
Why is my MacBook running slow even if it’s an older model?
Older MacBooks can run slow due to background processes like Spotlight indexing consuming CPU and SSD resources, heavy UI animations, accumulated caches, and memory pressure. Using Terminal commands to disable or adjust these factors can significantly improve performance.
What Terminal command stops Spotlight from slowing down my MacBook?
Use the command 'sudo mdutil -i off /' in Terminal to stop Spotlight indexing, which reduces background disk and CPU usage, helping speed up your slow MacBook.
How do I free up inactive RAM on a MacBook running slow?
Run the Terminal command 'sudo purge' to manually free inactive RAM. This is especially useful after running heavy workloads like Docker and can help your MacBook feel more responsive.
Can monitoring processes help fix a slow MacBook?
Yes, opening Activity Monitor via Terminal or Spotlight lets you identify and quit resource-hungry processes that may be causing your MacBook to run slow. This is an effective way to improve performance without deep system tweaks.
🤝 Let's engage further
Have sharper edge-case tweaks, benchmarks from your engineering fleet, or contrarian data? Reach out — always open to rigorous debate to sharpen this further.