WARNING: Because you will be using the Terminal and rm commands, it is best to back up using Time Machine or the backup method of your choice before proceeding with anything your Mac. Entering the wrong command can result in permanent data loss, so be sure to use accurate syntax. If you're not comfortable with the command line, it's best to avoid this altogether.
Launch Terminal and enter the following command and press Enter: sudo rm -rfv /Library/Caches/com.apple.iconservices.store
Connect Down, enter the following command and press Enter:
sudo find /private/var/folders/ \( -name com.apple.dock.iconcache -or -name com.apple.iconservices \ ) -exec rm -rfv {} \; ; sleep 3;sudo touch /Applications/* ; killall Dock; killall Finder
Finally, you need to restart your Mac in safe mode, which will also Dump many caches and force cache cache on Mac. The process is slightly different depending on whether it's a Mac with an Apple Silicon M chip or an Intel Mac.
After your Mac boots into Safe Mode, let it sit for about 5 minutes, then restart your Mac again by going to the APPLE menu and selecting Restart. The icon cache will be refreshed along with many other caches on your Mac.
The above is the detailed content of How to clear icon cache on Mac?. For more information, please follow other related articles on the PHP Chinese website!