> ## Content Index
> Fetch the complete content index at: https://www.moeox.com/llms.txt
> Use this file to discover other available public pages before exploring further.

# macos 清除图标缓存以及dock缓存
- URL: https://www.moeox.com/macos--e6-b8-85-e9-99-a4-e5-9b-be-e6-a0-87-e7-bc-93-e5-ad-98-e4-bb-a5-e5-8f-8adock-e7-bc-93-e5-ad-98/
- Published: 2022-08-31T13:32:57.000Z
- Updated: 2022-08-31T13:32:57.000Z
- Author: asumi233
- Tags: macos, Shell, #wp, #wp-post, #Import 2026-09-01 23:51

1.terminal输入命令或创建一个脚本，内容如下：

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

sudo rm -rf /Library/Caches/com.apple.iconservices.store;

killall Dock

killall Finder
```