Home > Wiki Tips

How to Fix Iconservicesagent High CPU & RAM Usage on Mac?

Updated on Tuesday, December 3, 2024

iBoysoft author Jenny Zeng

Written by

Jenny Zeng
Professional tech editor

Approved by

Jessica Shee

English Français Deutsch やまと Español Português

Summary: This article explains a background process called "iconservicesagent," which you can find in Activity Monitor. It tells you what iconservicesagent is and what to do when it consumes a large chunk of your Mac's RAM and CPU.

Fix iconservicesagent consuming high CPU and RAM on Mac

My Mac is running macOS Mojave and it hangs all the time with the beachball. When I check Activity Monitor, I find a proceess named "iconservicesagent" hogging up all the RAM. What is this process? How do I stop iconservicesagent from eating up the memory?

The issue of iconservicesagent spiking Mac's CPU and RAM can happen on all macOS versions, especially on macOS Mojave and High Sierra. It bogs down the system, rendering it unresponsive and unusable. 

In this article, we'll cover several proven solutions that can help you stop iconservicesagent from using up the CPU and RAM resources. Let's start by understanding what the process is.

What is iconservicesagent on Mac?

What is iconservicesagent on Mac

Iconservicesagent is an agent the Mac operating system uses to read and generate icon images from the resources provided in application bundles and by the system.

It handles requests for icon generation and serves those icons to applications and other processes. For example, when Finder needs to display a custom icon for a file or application, it might call on iconservicesagent to provide the appropriate icon.

Share this post to benefit other Mac users!

 

How to fix iconservicesagent high CPU and RAM usage on Mac?

When iconservicesagent struggles to process custom icons, it'll consume a large amount of CPU & RAM on your Mac. For instance, if a folder on your external drive has a custom icon, you may notice iconservicesagent starting to tax your Mac's RAM and CPU whenever you open the folder.

Iconservicesagent using a large amount of RAM and CPU on Mac

If that also happens to you, take the following solutions to fix it.

Fix 1: Clear the IconServices caches

One proven way to fix the iconservicesagent high CPU or RAM issue is to clear the IconServices caches. This is useful for all kinds of weird behavior with icons on Mac.

  1. Open Terminal.
  2. Run the following command to remove the main store.sudo rm -rfv /Library/Caches/com.apple.iconservices.storeClear the iconservices caches on Mac
  3. Enter your admin password and press Enter.
  4. Run the following command to remove the subsidiary data and Dock icon caches.sudo find /private/var/folders/ \( -name com.apple.dock.iconcache -or -name com.apple.iconservices \) -exec rm -rfv {} \;
  5. Restart your Mac and give it time to rebuild the caches.

Fix 2: Change the custom icons to the default

Since the issue is usually caused by custom icons, you can go back to the default icon to stop iconservicesagent from hogging up all the RAM.

  1. Select a file or folder that has the default icon.
  2. Right-click on it and choose "Get Info."
  3. Click the small icon at the top of the window.
  4. Select Edit > Copy in the menu bar. 
    How to change file or folder icon to the default on Mac
  5. Select the file or folder that has a custom icon you want to change.
  6. Right-click on it and choose "Get Info."
  7. Click the small icon at the top of the window.
  8. Select Edit > Paste in the menu bar.

If you have multiple files or folders with custom icons, try running the following command to set all files and folders on your Mac to the default icons.

find / | while read f; do xattr -d com.apple.ResourceFork "$f" 2>/dev/null; done

 Warning: This command is very broad and can potentially modify a large number of files and folders. Always back up important data before running commands like this.

If you're only looking to remove custom icons from folders and not touch other files, use: find / -type d | while read f; do xattr -d com.apple.ResourceFork "$f" 2>/dev/null; done

If you're only looking to remove custom icons from files and not touch other folders, use: find / -type f | while read f; do xattr -d com.apple.ResourceFork "$f" 2>/dev/null; done

If you only want to remove custom icons from a specific folder, use: (Replace ~/Movies with your folder path)

find ~/Movies -type f | while read f; do xattr -d com.apple.ResourceFork "$f";  done

Fix 3: Delete the dot file on Windows

If iconservicesagent begins to eat up your Mac's memory after an external drive is connected, try opening it on a Windows PC and deleting files with a dot. This way, you can get rid of the custom icons.

  1. Insert the external drive into your Windows PC.
  2. Open it and delete the files and folders beginning with a dot.
  3. Empty the Recycle bin.
  4. Reconnect it with your Mac to see if iconservicesagent behaves.

Have you resolved the issue? If you find this post useful, please share it with others.