清理重建 macOS 图标缓存

清理重建 macOS 图标缓存

macOS 图标缓存分为 Finder 和 Dock 缓存,删除对应目录文件即可。

  1. 删掉分散在系统隐藏目录里的 Dock 缓存和图标服务缓存

    sudo find /private/var/folders/ \( -name com.apple.dock.iconcache -or -name com.apple.iconservices \) -exec rm -rfv {} \;
    

    命令解释:在 /private/var/folders/ 这个系统临时 / 缓存根目录下递归查找,找到后执行删除:

    • com.apple.dock.iconcache:Dock 图标缓存
    • com.apple.iconservices:系统图标服务(IconsServices)缓存
  2. 删除全局图标缓存数据库

    sudo rm -rf /Library/Caches/com.apple.iconservices.store;
    
  3. 重启 Dock,重新加载图标、重建缓存

    killall Dock
    
  4. 重启 Finder,刷新桌面、文件图标、侧边栏等

    killall Finder
    
posted @ 2026-06-01 21:51  Jason207010  阅读(47)  评论(0)    收藏  举报