Smart Systems for Home

Plain how-to guides for smart home, security and home Wi-Fi

Junk Files macOS & Finder Create (and How to Remove Them)

· 6 min read · Home Tech

In this article
  1. What You'll Need
  2. Step-by-Step
  3. Common Mistakes
  4. Tips
  5. Troubleshooting
  6. Frequently Asked Questions

macOS and Finder create several types of junk files as you work: temporary files, cache files, log files, and hidden metadata files like .DS_Store. These files can accumulate and take up disk space, but most are harmless and some are even necessary. This guide explains what these junk files are, where they hide, and how to safely remove them without breaking your system.

What You'll Need

  • A Mac running macOS (any recent version; steps are similar across versions)
  • Administrator access to your user account (you'll need it to delete some files)
  • Optional: a disk space analyzer app like DaisyDisk or OmniDiskSweeper (free trial or free version) to see what's taking up space
  • Optional: an external backup drive or Time Machine backup (recommended before deleting anything)

Step-by-Step

  1. Understand the main types of junk files. The most common are:
    • Cache files – stored in ~/Library/Caches and /Library/Caches. Apps use these to speed up loading, but they can grow large.
    • Log files – stored in ~/Library/Logs and /Library/Logs. These record system and app activity.
    • Temporary files – stored in /private/var/tmp and /private/var/folders. macOS cleans these up automatically, but they can pile up.
    • .DS_Store files – created by Finder in every folder you open. They store view settings (icon size, window position). They're hidden but can be found on network drives or USB sticks.
    • Local Time Machine snapshots – stored in /Volumes/.timemachine or on your startup disk. These are backup snapshots that can take space.
    • Old iOS backups – stored in ~/Library/Application Support/MobileSync/Backup if you back up an iPhone or iPad to your Mac.
  2. Check your disk space first. Click the Apple menu > About This Mac > Storage. This shows how much space is used and by what categories (Apps, Documents, System, etc.). If you're low on space, you'll know which area to target.
  3. Use Finder's built-in tools. In the Storage view, click “Manage” to see recommendations like “Optimize Storage,” “Empty Trash Automatically,” and “Reduce Clutter.” These are safe and easy ways to clear junk.
  4. Delete .DS_Store files. These are harmless but can clutter network shares. To remove them from your current folder, open Terminal and type: find ~ -name ".DS_Store" -delete. This deletes all .DS_Store files in your home folder. You can also use the command defaults write com.apple.finder AppleShowAllFiles true to see hidden files, then delete them manually in Finder (but the Terminal command is faster).
  5. Clear user cache files. Open Finder, press Cmd+Shift+G, type ~/Library/Caches, and press Enter. You'll see folders for each app. You can delete the contents of these folders (but not the folders themselves). Be careful: only delete caches for apps you don't use often, or that are known to be safe. For example, deleting Safari's cache is safe; deleting a cache for an app you use daily might slow it down temporarily.
  6. Clear system cache files. These are in /Library/Caches. You'll need administrator privileges. Open Finder, press Cmd+Shift+G, type /Library/Caches, and press Enter. You can delete the contents of these folders, but be cautious: some system caches are needed for performance. It's usually safe to delete the contents of folders like com.apple.helpd or com.apple.iconservices.
  7. Remove old logs. Open ~/Library/Logs via Finder (Cmd+Shift+G). You can delete log files that are old (more than a week old) or that are very large. System logs are in /Library/Logs – you can delete old ones there too, but be careful not to delete active logs like DiagnosticMessages (which are safe to delete, but they're small).
  8. Delete old iOS backups. If you back up your iPhone to your Mac, these backups can be huge. Go to ~/Library/Application Support/MobileSync/Backup. You'll see folders with device names. Delete backups you no longer need. To do this safely, use Finder to move them to the Trash, then empty the Trash.
  9. Clear Time Machine local snapshots. If you have Time Machine enabled, macOS creates local snapshots on your startup disk. To delete them, open Terminal and type tmutil listlocalsnapshots / to see them. Then delete them with Or simply disable and re-enable Time Machine, which clears them.
  10. Use a third-party cleanup tool (optional). Apps like CleanMyMac X or OnyX can automate the process. If you use one, download it from the official website or the Mac App Store, and follow its instructions. Be aware that some tools can be aggressive; always review what they plan to delete.

Common Mistakes

  • Deleting all caches blindly. Some caches are needed for apps to run properly. Deleting them can cause apps to become slow or crash temporarily.
  • Deleting files in /System or /private/var without knowing what they are. These are critical system files; deleting the wrong thing can break your Mac.
  • Using “sudo” to delete files you don't understand. Running sudo rm -rf on the wrong directory can destroy your system.
  • Ignoring the Trash. Files you delete go to the Trash, which still takes up space. Empty the Trash regularly.
  • Deleting files while an app is running. If you delete a cache for an app that's open, the app may crash or misbehave.

Tips

  • Use the built-in “Optimize Storage” feature. It's safe and can automatically remove old iTunes movies, TV shows, and email attachments.
  • Set Finder to empty Trash after 30 days. In Finder > Settings > Advanced, check “Remove items from the Trash after 30 days.”
  • Use a disk space analyzer. Tools like OmniDiskSweeper (free) show you exactly which folders are taking up the most space, so you can target the biggest junk files.
  • Restart your Mac regularly. This clears temporary files and frees up memory.
  • Be selective with caches. If you delete a cache and an app runs slow, just use the app and it will rebuild the cache.

Troubleshooting

If you deleted something and your Mac behaves oddly, here's what to do:

  1. Restart your Mac. Many issues resolve with a simple restart, as macOS will recreate necessary temporary files.
  2. Check if an app is crashing. If a specific app crashes after you cleared its cache, open the app again – it should rebuild the cache. If it doesn't, try reinstalling the app.
  3. If your Mac won't boot. If you deleted a system file and your Mac won't start, boot into Recovery Mode (hold Cmd+R at startup) and use Disk Utility to repair the disk, or reinstall macOS. This is rare, but it can happen.
  4. If disk space didn't increase. You might have deleted files that were already in the Trash, or you missed large files like iOS backups. Run a disk space analyzer to find the big ones.
  5. If you can't delete a file because “it's in use.” Close the app that's using it, or restart your Mac, then try again.

Frequently Asked Questions

Are .DS_Store files dangerous?

No, they're harmless. They just store folder view preferences. You can delete them freely; macOS will recreate them as needed.

Can I delete everything in ~/Library/Caches?

Technically yes, but it's not recommended. Some apps might take longer to load afterward, and a few apps might have issues. It's better to delete only caches for apps you don't use often.

Is it safe to delete old log files?

Yes, log files are safe to delete. They're just text records of past activity. Deleting them won't affect your system's operation.

Why is “System” storage taking up so much space?

System storage includes macOS itself, but also caches, logs, and temporary files. Use the Storage Management tool to see a breakdown, and clear caches/logs as described above.

Will cleaning junk files speed up my Mac?

It can free up disk space, which helps if your disk was nearly full. It won't speed up your Mac if you have plenty of free space, but it can prevent slowdowns caused by low disk space.

Do I need to use a third-party cleaner?

No, you can do it manually with the steps above. Third-party cleaners can be convenient, but they're not necessary and some can be aggressive.