System · Maintenance

Mac maintenance: flush DNS, rebuild Spotlight and fix "Open With"

These are four fixes Mac users usually look up Terminal commands for: flush the DNS cache, rebuild the Spotlight index, rebuild the "Open With" menu and clear font caches. Tick the ones you need and press Run Selected. Tidy My Mac runs Apple's own tools for you, asks for your password once for the whole batch, and tells you what each one fixes and how long it takes.

macOS 26 Tahoe or later · No credit card · Everything runs on your Mac

For fixing problems, not for routine

A lot of Mac maintenance advice is folklore. Tidy My Mac's Maintenance section says it plainly at the top: run one of these when something is wrong, not as a routine, because none of them makes a healthy Mac faster.

That is also why some familiar tasks are missing. There is no "free up RAM" button, because macOS refills that cache straight away. There is no "repair disk permissions", which macOS dropped years ago, and no periodic maintenance scripts, which are gone from current macOS too.

The four tasks

TaskFixesTakes
Flush DNS CacheA site that moved still doesn't load, or a network change isn't picked up.A second. Needs your password.
Rebuild Spotlight IndexSpotlight doesn't find files that are there, or finds files that are gone.Minutes to hours in the background. Needs your password.
Rebuild "Open With" MenuDuplicate or missing apps in "Open With", wrong default apps, or files opening in the wrong app.About a minute.
Clear Font CachesGarbled text, missing or wrong fonts in apps.A second; takes effect after you log out and back in.

How to flush the DNS cache on a Mac

Your Mac remembers the address behind each site name for a while. When a site moves to a new server, or you switch networks or VPNs, that memory can point to the wrong place, and the site won't load even though it works everywhere else. Flushing the cache makes your Mac look each name up again.

Flush DNS Cache does what the usual Terminal recipe does: it runs dscacheutil -flushcache and then tells mDNSResponder, the macOS service that answers DNS lookups, to drop its cache. Because that service runs as the system, macOS asks for an administrator password.

How to rebuild the Spotlight index

When Spotlight can't find a file you know is there, or keeps showing one you deleted, its index is out of step with the disk. Rebuild Spotlight Index erases the index of your startup disk with mdutil -E /, and macOS rebuilds it from scratch in the background. That can take from minutes to hours on a full disk, and search results are incomplete until it finishes, so it is best started when you won't need Spotlight for a while.

Fix duplicate apps in the "Open With" menu

The "Open With" menu and your default apps come from a macOS database of every app it has seen. Over time it collects old versions, copies on disk images and apps you deleted, so the menu fills with duplicates or files open in the wrong app. Rebuild "Open With" Menu runs Apple's lsregister tool to clean the database out and register your apps again. It runs as you and needs no password.

Clear font caches

macOS caches the fonts you have installed. A damaged cache shows up as garbled text, missing characters or the wrong font in apps. Clear Font Caches removes your user's font cache databases with atsutil, and macOS builds fresh ones. It needs no password; log out and back in for it to take effect.

One password for the batch

Select several tasks and run them together. The ones that need administrator rights run first, through a single macOS password prompt, so you aren't asked twice and you find out right away if you cancel. Your password goes to macOS's own prompt, not to Tidy My Mac.

Each task then shows when it last ran, or why it didn't finish. Finished tasks are also recorded in the Dashboard's Cleanup history, without Put Back, since nothing was moved to the Trash.

When the problem is speed

If your Mac is slow rather than broken, these tasks won't help. Look at Performance to see which app is busy or using memory, Startup Items for what starts at login, and Background Services for what keeps running.

Questions about Maintenance

No, and the app says so. Each one fixes a specific problem. If your Mac is slow, Performance shows what is actually using it.

Yes. It only rebuilds Spotlight's index, not your files. The one cost is that search is incomplete until macOS finishes reindexing, which can take a while on a full disk.

The macOS service that caches DNS runs as the system, so telling it to clear its cache needs administrator rights. You type the password into macOS's own prompt, once per batch.

No. They clear caches and indexes that macOS rebuilds by itself. None of them touches your documents.

Try every section free for 7 days.

Just your email, no credit card. Then $19.99 for your first year, $59.99 a year after that.

Start your free trial