c-drive-cleaner
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseC盘垃圾文件分析器 v2.0
Drive C Junk File Analyzer v2.0
📌 功能概述
📌 Feature Overview
这是一个只读分析工具,用于深度扫描C盘上的可清理/可迁移文件,生成包含以下三大维度的详细报告:
- 🧠 智能删除建议 — 每个项目都给出明确的是否推荐删除的判断及理由
- 📦 迁移方案 — 标识哪些数据可以通过配置修改/符号链接等方式移出C盘到其他磁盘
- 🔬 深度扫描 — 超越v1.0的基础扫描,覆盖大文件TOP N、更多应用缓存、系统隐藏空间占用
本技能不会删除或修改任何文件,仅提供分析和可执行的操作方案。
This is a read-only analysis tool designed for deep scanning of cleanable/migratable files on Drive C, generating a detailed report covering three key dimensions:
- 🧠 Intelligent Deletion Suggestions — Clear recommendations on whether to delete each item, along with reasons
- 📦 Migration Solutions — Identify which data can be moved from Drive C to other disks via configuration changes/symbolic links, etc.
- 🔬 Deep Scanning — Beyond the basic scanning of v1.0, covering top N large files, more application caches, and system hidden space usage
This skill will not delete or modify any files, it only provides analysis and actionable operation plans.
🎯 适用场景
🎯 Applicable Scenarios
- C盘空间不足,需要释放空间
- 想了解哪些文件占用了C盘空间
- 想把某些缓存/数据从C盘迁移到D盘或其他盘
- 定期系统维护和清理
- 安装大型软件前检查可用空间
- 开发者清理开发工具缓存(npm、node-gyp、pip、cargo、maven等)
- 排查C盘"神秘消失"的空间(系统隐藏文件)
- Insufficient Drive C space, need to free up space
- Want to know which files are occupying Drive C space
- Want to move certain caches/data from Drive C to Drive D or other disks
- Regular system maintenance and cleanup
- Check available space before installing large software
- Developers clean up development tool caches (npm, node-gyp, pip, cargo, maven, etc.)
- Troubleshoot "mysteriously disappearing" space on Drive C (system hidden files)
⚙️ 工作流程
⚙️ Workflow
步骤1:获取C盘基础信息 + 隐藏空间检测
Step 1: Get Drive C Basic Information + Hidden Space Detection
powershell
undefinedpowershell
undefinedC盘基础信息
Drive C basic information
$drive = Get-PSDrive C
$totalGB = [math]::Round(($drive.Used + $drive.Free) / 1GB, 2)
$usedGB = [math]::Round($drive.Used / 1GB, 2)
$freeGB = [math]::Round($drive.Free / 1GB, 2)
$drive = Get-PSDrive C
$totalGB = [math]::Round(($drive.Used + $drive.Free) / 1GB, 2)
$usedGB = [math]::Round($drive.Used / 1GB, 2)
$freeGB = [math]::Round($drive.Free / 1GB, 2)
休眠文件 (hiberfil.sys)
Hibernation file (hiberfil.sys)
$hiber = if (Test-Path "C:\hiberfil.sys") { (Get-Item "C:\hiberfil.sys").Length } else { 0 }
$hiber = if (Test-Path "C:\hiberfil.sys") { (Get-Item "C:\hiberfil.sys").Length } else { 0 }
页面文件 (pagefile.sys)
Page file (pagefile.sys)
$page = if (Test-Path "C:\pagefile.sys") { (Get-Item "C:\pagefile.sys").Length } else { 0 }
$page = if (Test-Path "C:\pagefile.sys") { (Get-Item "C:\pagefile.sys").Length } else { 0 }
系统还原点
System restore points
$restorePoints = Get-ComputerRestorePoint -ErrorAction SilentlyContinue
$rpCount = @($restorePoints).Count
---$restorePoints = Get-ComputerRestorePoint -ErrorAction SilentlyContinue
$rpCount = @($restorePoints).Count
---步骤2:分类深度扫描(每个项目含三维度信息)
Step 2: Classified Deep Scanning (Each item includes three-dimensional information)
每个扫描项的输出格式必须包含:
- 📍 位置
- 📏 大小
- ✅/⚠️/❌ 删除建议:推荐删除 / 谨慎删除 / 不建议删除(附理由)
- 🚚 可迁移性:可迁移(附方法) / 不可迁移 / 部分可迁移
Output format for each scan item must include:
- 📍 Location
- 📏 Size
- ✅/⚠️/❌ Deletion Suggestion: Recommended to delete / Delete with caution / Not recommended to delete (with reasons)
- 🚚 Migratability: Migratable (with method) / Not migratable / Partially migratable
🔴 类别A:系统隐藏大文件(高收益但需谨慎)
🔴 Category A: System Hidden Large Files (High benefit but need caution)
A1. 休眠文件 hiberfil.sys
A1. Hibernation file hiberfil.sys
powershell
$path = "C:\hiberfil.sys"
if (Test-Path $path) {
$size = (Get-Item $path).Length
Write-Host "🔴 休眠文件: $([math]::Round($size/1GB, 2)) GB"
}| 属性 | 详情 |
|---|---|
| 位置 | |
| 大小 | 通常 = 物理内存大小 |
| 删除建议: ⚠️ 谨慎删除 | 如果你不使用休眠功能(合盖睡眠),可以安全关闭以释放等于内存大小的空间。如果使用休眠则不能删 |
| 可迁移: ❌ 不可迁移 | 只能开启/关闭 |
操作方案:
powershell
undefinedpowershell
$path = "C:\hiberfil.sys"
if (Test-Path $path) {
$size = (Get-Item $path).Length
Write-Host "🔴 Hibernation file: $([math]::Round($size/1GB, 2)) GB"
}| Attribute | Details |
|---|---|
| Location | |
| Size | Usually = Physical memory size |
| Deletion Suggestion: ⚠️ Delete with caution | If you don't use hibernation (lid-close sleep), you can safely disable it to free up space equal to your memory size. Do not delete if you use hibernation |
| Migratability: ❌ Not migratable | Can only be enabled/disabled |
Operation Plan:
powershell
undefined关闭休眠(释放空间,管理员PowerShell)
Disable hibernation (free up space, run as administrator in PowerShell)
powercfg.exe /hibernate off
powercfg.exe /hibernate off
如需重新开启
Re-enable if needed
powercfg.exe /hibernate on
---powercfg.exe /hibernate on
---A2. 页面文件 pagefile.sys
A2. Page file pagefile.sys
powershell
$path = "C:\pagefile.sys"
if (Test-Path $path) {
$size = (Get-Item $path).Length
Write-Host "🔴 页面文件: $([math]::Round($size/1GB, 2)) GB"
}| 属性 | 详情 |
|---|---|
| 位置 | |
| 大小 | 通常 = 物理内存大小 × 1~1.5倍 |
| 删除建议: ❌ 不建议直接删除 | 页面文件是系统虚拟内存的核心组件,删除可能导致系统不稳定或程序崩溃 |
| 可迁移: ✅ 可迁移到其他盘 | 通过系统设置将页面文件移到D盘 |
操作方案(迁移到D盘):
1. Win+R → sysdm.cpl → 高级 → 性能设置 → 高级 → 虚拟内存
2. 选择C盘 → 无分页文件 → 设置
3. 选择D盘 → 自定义大小(建议:物理内存×1.5) → 设置
4. 重启电脑生效或命令行:
powershell
undefinedpowershell
$path = "C:\pagefile.sys"
if (Test-Path $path) {
$size = (Get-Item $path).Length
Write-Host "🔴 Page file: $([math]::Round($size/1GB, 2)) GB"
}| Attribute | Details |
|---|---|
| Location | |
| Size | Usually = Physical memory size × 1~1.5 times |
| Deletion Suggestion: ❌ Not recommended to delete directly | Page file is a core component of system virtual memory; deleting it may cause system instability or program crashes |
| Migratability: ✅ Migratable to other disks | Move the page file to Drive D via system settings |
Operation Plan (Migrate to Drive D):
1. Win+R → sysdm.cpl → Advanced → Performance Settings → Advanced → Virtual Memory
2. Select Drive C → No paging file → Set
3. Select Drive D → Custom size (Recommended: Physical memory ×1.5) → Set
4. Restart computer to take effector command line:
powershell
undefined需要管理员权限,谨慎操作
Requires administrator privileges, use with caution
wmic pagefileset where name="C:\pagefile.sys" delete
wmic pagefileset create name="D:\pagefile.sys"
---wmic pagefileset where name="C:\pagefile.sys" delete
wmic pagefileset create name="D:\pagefile.sys"
---A3. 系统还原点
A3. System Restore Points
powershell
$rp = Get-ComputerRestorePoint -ErrorAction SilentlyContinue
$rpsize = vssadmin list shadowstorage 2>$null
Write-Host "🔴 还原点数量: $($rp.Count)"| 属性 | 详情 |
|---|---|
| 位置 | |
| 大小 | 取决于还原点数量和系统变化量 |
| 删除建议: ⚠️ 谨慎删除 | 可以删除旧的还原点保留最新的,但不建议全部删除(失去系统回滚能力) |
| 可迁移: ❌ 不可迁移 | 必须在C盘 |
操作方案:
powershell
undefinedpowershell
$rp = Get-ComputerRestorePoint -ErrorAction SilentlyContinue
$rpsize = vssadmin list shadowstorage 2>$null
Write-Host "🔴 Number of restore points: $($rp.Count)"| Attribute | Details |
|---|---|
| Location | |
| Size | Depends on the number of restore points and system changes |
| Deletion Suggestion: ⚠️ Delete with caution | You can delete old restore points and keep the latest ones, but it's not recommended to delete all (loses system rollback capability) |
| Migratability: ❌ Not migratable | Must stay on Drive C |
Operation Plan:
powershell
undefined查看所有还原点
View all restore points
vssadmin list shadows
vssadmin list shadows
删除所有还原点(释放大量空间!)
Delete all restore points (frees up a lot of space!)
vssadmin delete shadows /all /quiet
vssadmin delete shadows /all /quiet
或仅删除除最新以外的
Or delete all except the latest
通过 "配置" 限制最大占用空间:
Limit maximum occupied space via "Configuration":
vssadmin resize shadowstorage /on=C: /for=C: /maxsize=5GB
---vssadmin resize shadowstorage /on=C: /for=C: /maxsize=5GB
---A4. Windows 组件存储 (WinSxS)
A4. Windows Component Store (WinSxS)
powershell
undefinedpowershell
undefinedWinSxS实际占用(Dism工具)
Actual WinSxS usage (Dism tool)
Dism /Online /Cleanup-Image /AnalyzeComponentStore
| 属性 | 详情 |
|------|------|
| **位置** | `C:\Windows\WinSxS\` |
| **大小** | 通常 5-15 GB(显示的大小不准确,需用Dism查看实际可清理量) |
| **删除建议**: ✅ **推荐清理旧版本** | 可通过Dism安全清理旧版组件备份,通常能释放数GB |
| **可迁移**: ❌ 不可迁移 | Windows系统核心组件 |
**操作方案**:
```powershellDism /Online /Cleanup-Image /AnalyzeComponentStore
| Attribute | Details |
|------|------|
| **Location** | `C:\Windows\WinSxS\` |
| **Size** | Usually 5-15 GB (displayed size is inaccurate, use Dism to check actual cleanable amount) |
| **Deletion Suggestion**: ✅ **Recommended to clean up old versions** | Old version component backups can be safely cleaned via Dism, usually freeing up several GB of space |
| **Migratability**: ❌ Not migratable | Core Windows system component |
**Operation Plan**:
```powershell管理员PowerShell
Administrator PowerShell
1. 先分析
1. Analyze first
Dism /Online /Cleanup-Image /AnalyzeComponentStore
Dism /Online /Cleanup-Image /AnalyzeComponentStore
2. 清理(如果提示可以回收)
2. Clean up (if prompted that space can be reclaimed)
Dism /Online /Cleanup-Image /StartComponentCleanup
Dism /Online /Cleanup-Image /StartComponentCleanup /ResetBase
---Dism /Online /Cleanup-Image /StartComponentCleanup
Dism /Online /Cleanup-Image /StartComponentCleanup /ResetBase
---🟡 类别B:临时文件与缓存(推荐清理)
🟡 Category B: Temporary Files & Caches (Recommended to clean up)
B1. Windows 临时文件夹
B1. Windows Temporary Folder
powershell
$winTemp = "C:\Windows\Temp"
$s = (Get-ChildItem $winTemp -Recurse -Force -EA SilentlyContinue | Measure-Object Length -Sum).Sum
$c = (Get-ChildItem $winTemp -Recurse -Force -EA SilentlyContinue).Count| 属性 | 详情 |
|---|---|
| 位置 | |
| 删除建议: ✅ 强烈推荐删除 | 这些是安装包解压残留、程序运行临时文件,重启后多数已无用 |
| 可迁移: ❌ 不可迁移 | 系统固定路径 |
| 清理命令 | |
powershell
$winTemp = "C:\Windows\Temp"
$s = (Get-ChildItem $winTemp -Recurse -Force -EA SilentlyContinue | Measure-Object Length -Sum).Sum
$c = (Get-ChildItem $winTemp -Recurse -Force -EA SilentlyContinue).Count| Attribute | Details |
|---|---|
| Location | |
| Deletion Suggestion: ✅ Highly recommended to delete | These are residues from installation package extraction and temporary files generated during program operation; most are useless after restart |
| Migratability: ❌ Not migratable | Fixed system path |
| Cleanup Command | |
B2. 用户临时文件夹
B2. User Temporary Folder
powershell
$userTemp = "$env:LOCALAPPDATA\Temp"
$s = (Get-ChildItem $userTemp -Recurse -Force -EA SilentlyContinue | Measure-Object Length -Sum).Sum
$c = (Get-ChildItem $userTemp -Recurse -Force -EA SilentlyContinue).Count| 属性 | 详情 |
|---|---|
| 位置 | |
| 删除建议: ✅ 强烈推荐删除 | 用户级临时文件(.tmp, .log等),当前未运行的程序产生的tmp都可安全删除 |
| 可迁移: ❌ 不可迁移 | 由系统环境变量固定 |
| 清理命令 | |
powershell
$userTemp = "$env:LOCALAPPDATA\Temp"
$s = (Get-ChildItem $userTemp -Recurse -Force -EA SilentlyContinue | Measure-Object Length -Sum).Sum
$c = (Get-ChildItem $userTemp -Recurse -Force -EA SilentlyContinue).Count| Attribute | Details |
|---|---|
| Location | |
| Deletion Suggestion: ✅ Highly recommended to delete | User-level temporary files (.tmp, .log, etc.); tmp files generated by programs not currently running can be safely deleted |
| Migratability: ❌ Not migratable | Fixed by system environment variables |
| Cleanup Command | |
B3. 缩略图数据库
B3. Thumbnail Database
powershell
$thumbPath = "$env:LOCALAPPDATA\Microsoft\Windows\Explorer"
$dbFiles = Get-ChildItem $thumbPath -Filter "*.db" -ErrorAction SilentlyContinue
$s = ($dbFiles | Measure-Object Length -Sum).Sum| 属性 | 详情 |
|---|---|
| 位置 | |
| 删除建议: ✅ 推荐删除 | 删除后系统会在浏览文件夹时自动重建,首次打开文件夹时图标加载会稍慢 |
| 可迁移: ❌ 不可迁移 | 系统固定路径 |
| 清理命令 | |
powershell
$thumbPath = "$env:LOCALAPPDATA\Microsoft\Windows\Explorer"
$dbFiles = Get-ChildItem $thumbPath -Filter "*.db" -ErrorAction SilentlyContinue
$s = ($dbFiles | Measure-Object Length -Sum).Sum| Attribute | Details |
|---|---|
| Location | |
| Deletion Suggestion: ✅ Recommended to delete | The system will automatically rebuild them when browsing folders; icon loading will be slightly slow the first time you open a folder |
| Migratability: ❌ Not migratable | Fixed system path |
| Cleanup Command | |
B4. 回收站
B4. Recycle Bin
powershell
$rbPath = "C:\$Recycle.Bin"
$s = (Get-ChildItem $rbPath -Recurse -Force -EA SilentlyContinue | Measure-Object Length -Sum).Sum
$c = (Get-ChildItem $rbPath -Recurse -Force -EA SilentlyContinue).Count| 属性 | 详情 |
|---|---|
| 位置 | |
| 删除建议: ⚠️ 确认后清空 | 先检查里面有没有误删的重要文件,确认无用后再清空 |
| 可迁移: ❌ 不可迁移 | 系统固定路径 |
| 清理命令 | |
powershell
$rbPath = "C:\$Recycle.Bin"
$s = (Get-ChildItem $rbPath -Recurse -Force -EA SilentlyContinue | Measure-Object Length -Sum).Sum
$c = (Get-ChildItem $rbPath -Recurse -Force -EA SilentlyContinue).Count| Attribute | Details |
|---|---|
| Location | |
| Deletion Suggestion: ⚠️ Empty after confirmation | Check first for important files that were deleted by mistake; empty only after confirming they are useless |
| Migratability: ❌ Not migratable | Fixed system path |
| Cleanup Command | |
B5. Windows Update 缓存
B5. Windows Update Cache
powershell
$updateCache = "C:\Windows\SoftwareDistribution\Download"
$s = (Get-ChildItem $updateCache -Recurse -Force -EA SilentlyContinue | Measure-Object Length -Sum).Sum| 属性 | 详情 |
|---|---|
| 位置 | |
| 删除建议: ✅ 推荐删除(更新完成后) | 已下载安装成功的更新包残留。如正在更新请等待完成 |
| 可迁移: ❌ 不可迁移 | 系统固定路径 |
| 清理命令 | |
powershell
$updateCache = "C:\Windows\SoftwareDistribution\Download"
$s = (Get-ChildItem $updateCache -Recurse -Force -EA SilentlyContinue | Measure-Object Length -Sum).Sum| Attribute | Details |
|---|---|
| Location | |
| Deletion Suggestion: ✅ Recommended to delete (after update completion) | Residues of downloaded and successfully installed update packages. Wait for completion if updates are in progress |
| Migratability: ❌ Not migratable | Fixed system path |
| Cleanup Command | |
🟢 类别C:开发工具缓存(可删除 或 可迁移!)
🟢 Category C: Development Tool Caches (Can be deleted OR migrated!)
这是v2.0重点增强类别! 开发工具的缓存几乎都可以通过设置环境变量/配置文件来改变存储位置!
This is a key enhanced category in v2.0! Caches of development tools can almost all have their storage locations changed via environment variable settings/configuration files!
C1. npm 全局缓存
C1. npm Global Cache
powershell
$npmCache = "$env:LOCALAPPDATA\npm-cache"
$s = (Get-ChildItem $npmCache -Recurse -Force -EA SilentlyContinue | Measure-Object Length -Sum).Sum| 属性 | 详情 |
|---|---|
| 位置 | |
| 删除建议: ✅ 推荐删除 | 清理后下次 |
| 可迁移: ✅ 可迁移! | 设置 |
| 清理命令 | |
迁移方法(移到D盘):
powershell
undefinedpowershell
$npmCache = "$env:LOCALAPPDATA\npm-cache"
$s = (Get-ChildItem $npmCache -Recurse -Force -EA SilentlyContinue | Measure-Object Length -Sum).Sum| Attribute | Details |
|---|---|
| Location | |
| Deletion Suggestion: ✅ Recommended to delete | After cleanup, |
| Migratability: ✅ Migratable! | Set the |
| Cleanup Command | |
Migration Method (Move to Drive D):
powershell
undefined方法1: 设置环境变量(永久生效)
Method 1: Set environment variable (permanent effect)
[System.Environment]::SetEnvironmentVariable("npm_config_cache", "D:\dev-cache\npm", "User")
[System.Environment]::SetEnvironmentVariable("npm_config_cache", "D:\dev-cache\npm", "User")
方法2: npm config
Method 2: npm config
npm config set cache "D:\dev-cache\npm"
npm config set cache "D:\dev-cache\npm"
验证
Verify
npm config get cache
---npm config get cache
---C2. node-gyp 编译头文件
C2. node-gyp Compilation Header Files
powershell
$ngCache = "$env:LOCALAPPDATA\node-gyp\Cache"
$s = (Get-ChildItem $ngCache -Recurse -Force -EA SilentlyContinue | Measure-Object Length -Sum).Sum| 属性 | 详情 |
|---|---|
| 位置 | |
| 删除建议: ✅ 开发者推荐删除 | 下次编译 native addon 时会自动重新下载 Node.js 头文件 |
| 可迁移: ✅ 可迁移! | 设置 |
| 清理命令 | |
迁移方法:
powershell
undefinedpowershell
$ngCache = "$env:LOCALAPPDATA\node-gyp\Cache"
$s = (Get-ChildItem $ngCache -Recurse -Force -EA SilentlyContinue | Measure-Object Length -Sum).Sum| Attribute | Details |
|---|---|
| Location | |
| Deletion Suggestion: ✅ Recommended for developers to delete | Node.js header files will be automatically re-downloaded when compiling native addons next time |
| Migratability: ✅ Migratable! | Set |
| Cleanup Command | |
Migration Method:
powershell
undefined创建目标目录
Create target directory
New-Item -ItemType Directory -Path "D:\dev-cache\node-gyp" -Force
New-Item -ItemType Directory -Path "D:\dev-cache\node-gyp" -Force
删除原缓存后创建符号链接(需要先删除原目录)
Delete original cache then create symbolic link (need to delete original directory first)
Remove-Item "$env:LOCALAPPDATA\node-gyp\Cache" -Recurse -Force
cmd /c mklink /D "$env:LOCALAPPDATA\node-gyp\Cache" "D:\dev-cache\node-gyp"
---Remove-Item "$env:LOCALAPPDATA\node-gyp\Cache" -Recurse -Force
cmd /c mklink /D "$env:LOCALAPPDATA\node-gyp\Cache" "D:\dev-cache\node-gyp"
---C3. pip (Python) 缓存
C3. pip (Python) Cache
powershell
$pipCache = "$env:LOCALAPPDATA\pip\cache"
if (Test-Path $pipCache) {
$s = (Get-ChildItem $pipCache -Recurse -Force -EA SilentlyContinue | Measure-Object Length -Sum).Sum
}| 属性 | 详情 |
|---|---|
| 位置 | |
| 删除建议: ✅ 推荐删除 | |
| 可迁移: ✅ 可迁移! | 设置环境变量 |
| 清理命令 | |
迁移方法:
powershell
undefinedpowershell
$pipCache = "$env:LOCALAPPDATA\pip\cache"
if (Test-Path $pipCache) {
$s = (Get-ChildItem $pipCache -Recurse -Force -EA SilentlyContinue | Measure-Object Length -Sum).Sum
}| Attribute | Details |
|---|---|
| Location | |
| Deletion Suggestion: ✅ Recommended to delete | |
| Migratability: ✅ Migratable! | Set the |
| Cleanup Command | |
Migration Method:
powershell
undefined设置环境变量
Set environment variable
[System.Environment]::SetEnvironmentVariable("PIP_CACHE_DIR", "D:\dev-cache\pip", "User")
[System.Environment]::SetEnvironmentVariable("PIP_CACHE_DIR", "D:\dev-cache\pip", "User")
或 pip 配置文件方式: %APPDATA%\pip\pip.ini
Or via pip configuration file: %APPDATA%\pip\pip.ini
[global]
[global]
cache-dir = D:/dev-cache/pip
cache-dir = D:/dev-cache/pip
---
---C4. Yarn 缓存
C4. Yarn Cache
powershell
$yarnCache = "$env:LOCALAPPDATA\Yarn\Cache"
if (Test-Path $yarnCache) {
$s = (Get-ChildItem $yarnCache -Recurse -Force -EA SilentlyContinue | Measure-Object Length -Sum).Sum
}| 属性 | 详情 |
|---|---|
| 位置 | |
| 删除建议: ✅ 推荐删除 | |
| 可迁移: ✅ 可迁移! | |
| 清理命令 | |
迁移方法:
powershell
yarn config set cacheFolder "D:\dev-cache\yarn"powershell
$yarnCache = "$env:LOCALAPPDATA\Yarn\Cache"
if (Test-Path $yarnCache) {
$s = (Get-ChildItem $yarnCache -Recurse -Force -EA SilentlyContinue | Measure-Object Length -Sum).Sum
}| Attribute | Details |
|---|---|
| Location | |
| Deletion Suggestion: ✅ Recommended to delete | Use |
| Migratability: ✅ Migratable! | |
| Cleanup Command | |
Migration Method:
powershell
yarn config set cacheFolder "D:\dev-cache\yarn"C5. pnpm 缓存 (store + content-v2)
C5. pnpm Cache (store + content-v2)
powershell
$pnpmStore = "$env:LOCALAPPDATA\pnpm\store"
$pnpmContent = "$env:LOCALAPPDATA\pnpm\content-v2"| 属性 | 详情 |
|---|---|
| 位置 | |
| 删除建议: ✅ 推荐删除 | pnpm store 是全局包存储,删除后按需重新下载 |
| 可迁移: ✅ 可迁移! | 设置 |
| 清理命令 | |
迁移方法:
powershell
undefinedpowershell
$pnpmStore = "$env:LOCALAPPDATA\pnpm\store"
$pnpmContent = "$env:LOCALAPPDATA\pnpm\content-v2"| Attribute | Details |
|---|---|
| Location | |
| Deletion Suggestion: ✅ Recommended to delete | pnpm store is global package storage; it will be re-downloaded on demand after deletion |
| Migratability: ✅ Migratable! | Set |
| Cleanup Command | |
Migration Method:
powershell
undefined设置 pnpm home
Set pnpm home
pnpm set store-dir "D:\dev-cache\pnpm-store"
pnpm set global-bin-dir "D:\dev-cache\pnpm-global"
pnpm set store-dir "D:\dev-cache\pnpm-store"
pnpm set global-bin-dir "D:\dev-cache\pnpm-global"
或通过环境变量
Or via environment variable
[System.Environment]::SetEnvironmentVariable("PNPM_HOME", "D:\dev-cache\pnpm", "User")
---[System.Environment]::SetEnvironmentVariable("PNPM_HOME", "D:\dev-cache\pnpm", "User")
---C6. NuGet (.NET) 包缓存
C6. NuGet (.NET) Package Cache
powershell
$nugetPkg = "$env:USERPROFILE\.nuget\packages"| 属性 | 详情 |
|---|---|
| 位置 | |
| 删除建议: ⚠️ 开发者谨慎删除 | 删除后Visual Studio打开解决方案时会重新下载依赖包 |
| 可迁移: ✅ 可迁移! | NuGet.config 中设置 |
| 清理命令 | 手动删除 |
迁移方法:
xml
<!-- %APPDATA%\NuGet\NuGet.Config -->
<configuration>
<config>
<add key="globalPackagesFolder" value="D:\dev-cache\nuget-packages" />
</config>
</configuration>powershell
$nugetPkg = "$env:USERPROFILE\.nuget\packages"| Attribute | Details |
|---|---|
| Location | |
| Deletion Suggestion: ⚠️ Developers delete with caution | After deletion, Visual Studio will re-download dependent packages when opening solutions |
| Migratability: ✅ Migratable! | Set |
| Cleanup Command | Manually delete contents of |
Migration Method:
xml
<!-- %APPDATA%\NuGet\NuGet.Config -->
<configuration>
<config>
<add key="globalPackagesFolder" value="D:\dev-cache\nuget-packages" />
</config>
</configuration>C7. Cargo (Rust) 缓存
C7. Cargo (Rust) Cache
powershell
$cargoRegistry = "$env:USERPROFILE\.cargo\registry"
$cargoGit = "$env:USERPROFILE\.cargo\git"| 属性 | 详情 |
|---|---|
| 位置 | |
| 删除建议: ✅ Rust开发者可删除 | |
| 可迁移: ✅ 可迁移! | 设置 |
| 清理命令 | |
迁移方法:
powershell
undefinedpowershell
$cargoRegistry = "$env:USERPROFILE\.cargo\registry"
$cargoGit = "$env:USERPROFILE\.cargo\git"| Attribute | Details |
|---|---|
| Location | |
| Deletion Suggestion: ✅ Rust developers can delete | |
| Migratability: ✅ Migratable! | Set the |
| Cleanup Command | |
Migration Method:
powershell
undefined移动整个 .cargo 目录到D盘
Move the entire .cargo directory to Drive D
Move-Item "$env:USERPROFILE.cargo" "D:\dev-cache.cargo"
Move-Item "$env:USERPROFILE.cargo" "D:\dev-cache.cargo"
创建符号链接
Create symbolic link
cmd /c mklink /D "$env:USERPROFILE.cargo" "D:\dev-cache.cargo"
cmd /c mklink /D "$env:USERPROFILE.cargo" "D:\dev-cache.cargo"
或设置环境变量 CARGO_HOME=D:\dev-cache.cargo
Or set environment variable CARGO_HOME=D:\dev-cache.cargo
---
---C8. Maven (Java) 本地仓库
C8. Maven (Java) Local Repository
powershell
$mavenRepo = "$env:USERPROFILE\.m2\repository"| 属性 | 详情 |
|---|---|
| 位置 | |
| 删除建议: ⚠️ Java开发者谨慎删除 | 包含所有下载过的Maven依赖jar包 |
| 可迁移: ✅ 可迁移! | settings.xml 中设置 |
| 清理命令 | 删除 |
迁移方法:
xml
<!-- ~/.m2/settings.xml -->
<settings>
<localRepository>D:/dev-cache/maven-repo</localRepository>
</settings>powershell
$mavenRepo = "$env:USERPROFILE\.m2\repository"| Attribute | Details |
|---|---|
| Location | |
| Deletion Suggestion: ⚠️ Java developers delete with caution | Contains all downloaded Maven dependency jar packages |
| Migratability: ✅ Migratable! | Set |
| Cleanup Command | Delete contents of |
Migration Method:
xml
<!-- ~/.m2/settings.xml -->
<settings>
<localRepository>D:/dev-cache/maven-repo</localRepository>
</settings>C9. Gradle (Java/Android) 缓存
C9. Gradle (Java/Android) Cache
powershell
$gradleCaches = "$env:USERPROFILE\.gradle\caches"| 属性 | 详情 |
|---|---|
| 位置 | |
| 删除建议: ✅ 推荐删除 | |
| 可迁移: ✅ 可迁移! | 设置 |
| 清理命令 | |
迁移方法:
powershell
undefinedpowershell
$gradleCaches = "$env:USERPROFILE\.gradle\caches"| Attribute | Details |
|---|---|
| Location | |
| Deletion Suggestion: ✅ Recommended to delete | |
| Migratability: ✅ Migratable! | Set the |
| Cleanup Command | |
Migration Method:
powershell
undefined设置环境变量
Set environment variable
[System.Environment]::SetEnvironmentVariable("GRADLE_USER_HOME", "D:\dev-cache\gradle", "User")
---[System.Environment]::SetEnvironmentVariable("GRADLE_USER_HOME", "D:\dev-cache\gradle", "User")
---🔵 类别D:浏览器缓存
🔵 Category D: Browser Caches
D1. Chrome / Edge
D1. Chrome / Edge
powershell
$chromeCache = "$env:LOCALAPPDATA\Google\Chrome\User Data\Default\Cache"
$edgeCache = "$env:LOCALAPPDATA\Microsoft\Edge\User Data\Default\Cache"| 属性 | 详情 |
|---|---|
| 位置 | 各浏览器 User Data 下的 Cache / Code Cache / GPUCache |
| 删除建议: ✅ 推荐删除 | 但可能丢失部分网站登录状态、表单数据 |
| 可迁移: ⚠️ 部分可迁移 | Chrome支持 |
| 清理方式 | 浏览器内 Ctrl+Shift+Delete 最安全 |
Chrome缓存目录迁移:
powershell
undefinedpowershell
$chromeCache = "$env:LOCALAPPDATA\Google\Chrome\User Data\Default\Cache"
$edgeCache = "$env:LOCALAPPDATA\Microsoft\Edge\User Data\Default\Cache"| Attribute | Details |
|---|---|
| Location | Cache / Code Cache / GPUCache under User Data of each browser |
| Deletion Suggestion: ✅ Recommended to delete | But may lose some website login status and form data |
| Migratability: ⚠️ Partially migratable | Chrome supports the |
| Cleanup Method | Using Ctrl+Shift+Delete within the browser is the safest |
Chrome Cache Directory Migration:
powershell
undefinedChrome快捷方式目标添加参数
Add parameter to Chrome shortcut target
"...chrome.exe" --disk-cache-dir="D:\browser-cache\chrome"
"...chrome.exe" --disk-cache-dir="D:\browser-cache\chrome"
---
---🟣 类别E:应用数据与日志
🟣 Category E: Application Data & Logs
E1. 系统日志文件
E1. System Log Files
powershell
$logFiles = @{
"setupact.log" = "C:\Windows\setupact.log"
"iis.log" = "C:\Windows\iis.log"
"comsetup.log" = "C:\Windows\comsetup.log"
"DumpStack.log" = "C:\DumpStack.log"
}| 属性 | 详情 |
|---|---|
| 删除建议: ✅ 一般用户可删除 | 调试用途,普通用户不需要 |
| 可迁移: ❌ 不可迁移 |
powershell
$logFiles = @{
"setupact.log" = "C:\Windows\setupact.log"
"iis.log" = "C:\Windows\iis.log"
"comsetup.log" = "C:\Windows\comsetup.log"
"DumpStack.log" = "C:\DumpStack.log"
}| Attribute | Details |
|---|---|
| Deletion Suggestion: ✅ General users can delete | For debugging purposes; not needed by ordinary users |
| Migratability: ❌ Not migratable |
E2. 搜狗PDF本地副本
E2. Sogou PDF Local Copy
| 属性 | 详情 |
|---|---|
| 位置 | |
| 说明 | 搜狗PDF Reader在本地存放了一份完整程序副本(exe+dll) |
| 删除建议: ✅ 如果你不用搜狗PDF可直接卸载/删除 | 如果还在用,这个副本不应动 |
| 可迁移: ❌ 不建议迁移 | 应通过卸载程序处理 |
| Attribute | Details |
|---|---|
| Location | |
| Description | Sogou PDF Reader stores a complete local copy of the program (exe+dll) |
| Deletion Suggestion: ✅ Uninstall/delete directly if you don't use Sogou PDF | Do not modify this copy if you are still using it |
| Migratability: ❌ Not recommended to migrate | Should be handled via uninstallation program |
E3. JetBrains IDE 数据
E3. JetBrains IDE Data
| 属性 | 详情 |
|---|---|
| 位置 | |
| 删除建议: ⚠️ IDE用户谨慎处理 | 包含索引缓存、插件、配置;可删除旧版本IDE的数据 |
| 可迁移: ✅ 可迁移! | JetBrains Toolbox Settings → Change installation path for shared data |
迁移方法:
JetBrains Toolbox → Settings → Change installation path for:
- Plugins directory
- Shared scripts, configs, etc.
→ 改为 D:\dev-tools\jetbrains-shared| Attribute | Details |
|---|---|
| Location | |
| Deletion Suggestion: ⚠️ IDE users handle with caution | Contains index caches, plugins, configurations; can delete data of old IDE versions |
| Migratability: ✅ Migratable! | JetBrains Toolbox Settings → Change installation path for shared data |
Migration Method:
JetBrains Toolbox → Settings → Change installation path for:
- Plugins directory
- Shared scripts, configs, etc.
→ Change to D:\dev-tools\jetbrains-shared⚫ 类别F:深度扫描 — 大文件 TOP N
⚫ Category F: Deep Scanning — Top N Large Files
v2.0新增! 扫描C盘上最大的N个文件,快速定位空间杀手。
powershell
undefinedNew in v2.0! Scan the N largest files on Drive C to quickly locate space hogs.
powershell
undefined扫描C盘最大的20个文件(排除Windows目录以避免误扫系统文件)
Scan the top 20 largest files on Drive C (exclude Windows directory to avoid scanning system files by mistake)
Get-ChildItem -Path C:\ -Recurse -Force -File -ErrorAction SilentlyContinue |
Where-Object { $.FullName -notlike 'C:\Windows*' -and $.FullName -notlike 'C:`$Recycle.Bin*' } |
Sort-Object Length -Descending |
Select-Object -First 20 |
Select-Object @{N='大小MB';E={[math]::Round($.Length/1MB,2)}},
@{N='大小GB';E={[math]::Round($.Length/1GB,2)}},
FullName
**输出格式示例**:
| 排名 | 大小 | 文件路径 | 建议 |
|------|------|----------|------|
| #1 | 8.5 GB | `C:\Users\decent\.docker` | Docker镜像,可用 `docker system prune` 清理或改存储路径 |
| #2 | 3.2 GB | `C:\Users\decent\AppData\Local\Docker\wsl` | Docker WSL2 数据,可迁移 |
| #3 | 2.1 GB | `C:\Users\decent\.nuget\packages` | NuGet缓存,见C6迁移方案 |
| ... | ... | ... | ... |
---Get-ChildItem -Path C:\ -Recurse -Force -File -ErrorAction SilentlyContinue |
Where-Object { $.FullName -notlike 'C:\Windows*' -and $.FullName -notlike 'C:`$Recycle.Bin*' } |
Sort-Object Length -Descending |
Select-Object -First 20 |
Select-Object @{N='Size(MB)';E={[math]::Round($.Length/1MB,2)}},
@{N='Size(GB)';E={[math]::Round($.Length/1GB,2)}},
FullName
**Sample Output Format**:
| Rank | Size | File Path | Suggestion |
|------|------|----------|------|
| #1 | 8.5 GB | `C:\Users\decent\.docker` | Docker images, use `docker system prune` to clean up or change storage path |
| #2 | 3.2 GB | `C:\Users\decent\AppData\Local\Docker\wsl` | Docker WSL2 data, can be migrated |
| #3 | 2.1 GB | `C:\Users\decent\.nuget\packages` | NuGet cache, see migration plan in C6 |
| ... | ... | ... | ... |
---⚫ 类别G:深度扫描 — 特殊占用源
⚫ Category G: Deep Scanning — Special Space Occupants
G1. Docker Desktop 数据 (WSL2)
G1. Docker Desktop Data (WSL2)
powershell
$dockerData = "$env:LOCALAPPDATA\Docker\wsl"
$dockerProfiles = "$env:APPDATA\Docker\profiles"| 属性 | 详情 |
|---|---|
| 位置 | |
| 大小 | 可能数GB~数十GB(取决于镜像数量) |
| 删除建议: ⚠️ Docker使用者谨慎 | |
| 可迁移: ✅ 可迁移! | Docker Desktop Settings → Resources → Advanced → Disk image location → 改为 D 盘 |
powershell
$dockerData = "$env:LOCALAPPDATA\Docker\wsl"
$dockerProfiles = "$env:APPDATA\Docker\profiles"| Attribute | Details |
|---|---|
| Location | |
| Size | May be several GB to tens of GB (depending on the number of images) |
| Deletion Suggestion: ⚠️ Docker users handle with caution | |
| Migratability: ✅ Migratable! | Docker Desktop Settings → Resources → Advanced → Disk image location → Change to Drive D |
G2. WSL (Windows Subsystem for Linux) 发行版
G2. WSL (Windows Subsystem for Linux) Distributions
powershell
wsl --list --verbosepowershell
wsl --list --verbose查看 .vhdx 文件位置
View .vhdx file location
Get-ChildItem "$env:LOCALAPPDATA\Packages" -Filter "*.vhdx" -Recurse -ErrorAction SilentlyContinue
| 属性 | 详情 |
|------|------|
| **位置** | `%LOCALAPPDATA%\Packages\<发行版>\LocalState\ext4.vhdx` |
| **大小** | 取决于Linux发行版内的数据量 |
| **删除建议**: ⚠️ **WSL使用者谨慎** | 可导出后删除原vhdx再导入到新位置实现迁移 |
| **可迁移**: ✅ **可迁移!** | 见下方 |
**WSL迁移到D盘方法**:
```powershellGet-ChildItem "$env:LOCALAPPDATA\Packages" -Filter "*.vhdx" -Recurse -ErrorAction SilentlyContinue
| Attribute | Details |
|------|------|
| **Location** | `%LOCALAPPDATA%\Packages\<Distribution>\LocalState\ext4.vhdx` |
| **Size** | Depends on the amount of data within the Linux distribution |
| **Deletion Suggestion**: ⚠️ **WSL users handle with caution** | Can export, delete the original vhdx, then import to a new location to achieve migration |
| **Migratability**: ✅ **Migratable!** | See below |
**Method to Migrate WSL to Drive D**:
```powershell1. 导出发行版
1. Export distribution
wsl --export <发行版名> D:\wsl-backups\ubuntu.tar
wsl --export <Distribution Name> D:\wsl-backups\ubuntu.tar
2. 注销原发行版
2. Unregister original distribution
wsl --unregister <发行版名>
wsl --unregister <Distribution Name>
3. 从备份导入到D盘
3. Import from backup to Drive D
wsl --import <发行版名> D:\WSL\ubuntu D:\wsl-backups\ubuntu.tar
wsl --import <Distribution Name> D:\WSL\ubuntu D:\wsl-backups\ubuntu.tar
4. 删除备份文件(可选)
4. Delete backup file (optional)
Remove-Item D:\wsl-backups\ubuntu.tar
---Remove-Item D:\wsl-backups\ubuntu.tar
---G3. 用户文件夹中的大文件夹
G3. Large Folders in User Directory
powershell
undefinedpowershell
undefined扫描用户目录下的一级子目录大小
Scan size of first-level subdirectories under user directory
Get-ChildItem "$env:USERPROFILE" -Directory -Force -ErrorAction SilentlyContinue |
ForEach-Object {
$size = (Get-ChildItem $.FullName -Recurse -Force -EA SilentlyContinue | Measure-Object Length -Sum).Sum
[PSCustomObject]@{ Folder=$.Name; SizeMB=[math]::Round($size/1MB,2); SizeGB=[math]::Round($size/1GB,2) }
} | Sort-Object SizeMB -Descending | Select-Object -First 15
常见大文件夹及处理建议:
| 文件夹 | 典型大小 | 能否移出C盘 | 方法 |
|--------|---------|-------------|------|
| `.docker` | 1-20 GB | ✅ | Docker设置改磁盘映像位置 |
| `.nuget` | 1-10 GB | ✅ | NuGet.config改路径 |
| `.gradle` | 500MB-5GB | ✅ | GRADLE_USER_HOME环境变量 |
| `.m2` (Maven) | 500MB-5GB | ✅ | settings.xml改localRepository |
| `.cargo` (Rust) | 200MB-2GB | ✅ | CARGO_HOME环境变量 |
| `.cache` | 变化大 | 视情况而定 | 检查里面是什么 |
| `Desktop` | 变化大 | ⚠️ 可移动桌面 | 系统设置→个性化→更改桌面路径 |
| `Downloads` | 变化大 | ✅ | 系统设置→更改下载文件夹位置 |
| `Documents` | 变化大 | ✅ | 系统设置→更改文档文件夹位置 |
| `Videos` | 变化大 | ✅ | 同上 |
| `AppData\Local` | 大 | 部分可移 | 见各具体条目 |
| `AppData\Roaming` | 中 | 部分可移 | 见各具体条目 |
**Windows用户文件夹迁移通用方法**:此电脑 → 右键"文档"(或"下载"/"桌面"/"视频"等) → 属性 → 位置选项卡 → 输入新路径(如 D:\Documents) → 移动
---Get-ChildItem "$env:USERPROFILE" -Directory -Force -ErrorAction SilentlyContinue |
ForEach-Object {
$size = (Get-ChildItem $.FullName -Recurse -Force -EA SilentlyContinue | Measure-Object Length -Sum).Sum
[PSCustomObject]@{ Folder=$.Name; SizeMB=[math]::Round($size/1MB,2); SizeGB=[math]::Round($size/1GB,2) }
} | Sort-Object SizeMB -Descending | Select-Object -First 15
Common large folders and handling suggestions:
| Folder | Typical Size | Can be moved out of Drive C | Method |
|--------|---------|-------------|------|
| `.docker` | 1-20 GB | ✅ | Change disk image location in Docker settings |
| `.nuget` | 1-10 GB | ✅ | Change path in NuGet.config |
| `.gradle` | 500MB-5GB | ✅ | GRADLE_USER_HOME environment variable |
| `.m2` (Maven) | 500MB-5GB | ✅ | Change localRepository in settings.xml |
| `.cargo` (Rust) | 200MB-2GB | ✅ | CARGO_HOME environment variable |
| `.cache` | Variable | Depends on situation | Check what's inside |
| `Desktop` | Variable | ⚠️ Desktop can be moved | System Settings → Personalization → Change desktop path |
| `Downloads` | Variable | ✅ | System Settings → Change downloads folder location |
| `Documents` | Variable | ✅ | System Settings → Change documents folder location |
| `Videos` | Variable | ✅ | Same as above |
| `AppData\Local` | Large | Partially movable | See specific entries |
| `AppData\Roaming` | Medium | Partially movable | See specific entries |
**General Method to Migrate Windows User Folders**:This PC → Right-click "Documents" (or "Downloads"/"Desktop"/"Videos", etc.) → Properties → Location tab → Enter new path (e.g., D:\Documents) → Move
---G4. C盘根目录可疑文件
G4. Suspicious Files in Drive C Root Directory
powershell
$suspicious = @(
"C:\Za3fb24eb1dd5a3.zip",
"C:\aa3fb24eb1dd5a3.zip",
"C:\sfs4.9",
"C:\sml8.31",
"C:\DumpStack.log"
)
foreach ($f in $suspicious) {
if (Test-Path $f) {
$info = Get-Item $f
[PSCustomObject]@{
文件=$info.Name
大小KB=[math]::Round($info.Length/1KB,2)
创建时间=$info.CreationTime.ToString('yyyy-MM-dd HH:mm:ss')
完整路径=$info.FullName
}
}
}| 属性 | 详情 |
|---|---|
| 删除建议: 🔴 必须人工确认! | 这些文件名称看起来像随机生成的(可能是下载残留/恶意软件残留/加密文件碎片),需要你亲自右键属性检查 |
| 可迁移: ✅ 可以移走 | 直接剪切粘贴到D盘即可(如果是你的有用文件的话) |
powershell
$suspicious = @(
"C:\Za3fb24eb1dd5a3.zip",
"C:\aa3fb24eb1dd5a3.zip",
"C:\sfs4.9",
"C:\sml8.31",
"C:\DumpStack.log"
)
foreach ($f in $suspicious) {
if (Test-Path $f) {
$info = Get-Item $f
[PSCustomObject]@{
File=$info.Name
SizeKB=[math]::Round($info.Length/1KB,2)
CreationTime=$info.CreationTime.ToString('yyyy-MM-dd HH:mm:ss')
FullPath=$info.FullName
}
}
}| Attribute | Details |
|---|---|
| Deletion Suggestion: 🔴 Must confirm manually! | These files have randomly generated names (may be download residues/malware residues/encrypted file fragments); you need to right-click and check properties yourself |
| Migratability: ✅ Can be moved | Directly cut and paste to Drive D (if they are your useful files) |
📊 报告输出格式模板
📊 Report Output Format Template
当用户请求分析时,应按以下结构化格式输出报告:
╔══════════════════════════════════════════════════════╗
║ C盘深度分析报告 v2.0 ║
║ 只读模式 · 未修改任何文件 ║
╚══════════════════════════════════════════════════════╝
━━━ 一、C盘空间概况 ━━━
总容量: XXX GB | 已用: XXX GB (XX%) | 可用: XXX GB
隐藏空间占用:
├─ 休眠文件(hiberfil.sys): XX GB ─ 建议: [✅推荐关/⚠️保留]
├─ 页面文件(pagefile.sys): XX GB ─ 建议: [✅可迁移到D盘]
├─ 系统还原点: X个 ─ 建议: [⚠️可清理旧的]
└─ WinSxS组件存储: XX GB (实际可清理: X GB) ─ 建议: [✅推荐Dism清理]
━━━ 二、可清理项目汇总 ━━━
【✅ 强烈推荐删除】
├─ ☐ Windows临时文件 XX MB ── 清理命令: ...
├─ ☐ 用户临时文件 XX MB ── 清理命令: ...
├─ ☐ 缩略图缓存 XX MB ── 清理命令: ...
└─ ☐ 系统日志文件 XX KB ── 清理命令: ...
【⚠️ 确认后可删除】
├─ ☐ 回收站 XX MB ── (70个文件)
├─ ☐ Windows更新缓存 XX MB ── (确保不在更新中)
└─ ...
【💻 开发工具缓存】(可删除 OR 可迁移!)
├─ ☐ npm缓存 XX MB ── 删除: npm cache clean --force
│ 迁移: npm config set cache "D:\..."
├─ ☐ node-gyp缓存 XX MB ── 删除: Remove-Item ...
│ 迁移: 符号链接到 D:\...
├─ ☐ pip缓存 XX MB ── 删除: pip cache purge
│ 迁移: PIP_CACHE_DIR=D:\...
├─ ☐ Yarn缓存 XX MB ── 迁移: yarn config set cacheFolder
├─ ☐ pnpm缓存 XX MB ── 迁移: pnpm set store-dir
├─ ☐ NuGet缓存 XX MB ── 迁移: NuGet.Config
├─ ☐ Cargo(Rust)缓存 XX MB ── 迁移: CARGO_HOME
├─ ☐ Maven仓库 XX MB ── 迁移: settings.xml
└─ ☐ Gradle缓存 XX MB ── 迁移: GRADLE_USER_HOME
━━━ 三、🔍 C盘大文件 TOP 20 ━━━
#1 XX GB C:\xxx\xxx ── [建议: xxx]
#2 XX GB C:\xxx\xxx ── [建议: xxx]
...
━━━ 四、⚠️ 需人工检查的项目 ━━━
├─ 🔴 C盘根目录可疑文件 (4个)
│ Za3fb24eb1dd5a3.zip ── 请右键属性检查来源
│ aa3fb24eb1dd5a3.zip ── 请右键属性检查来源
│ sfs4.9 ── 请右键属性检查来源
│ sml8.31 ── 请右键属性检查来源
│
├─ 🔴 Docker/WSL数据 XX GB ── 可迁移到D盘
└─ ...
━━━ 五、📦 一键迁移指南(将数据从C盘移到D盘)━━━
[详见各类别中的"迁移方法"]When users request analysis, output the report in the following structured format:
╔══════════════════════════════════════════════════════╗
║ Drive C Deep Analysis Report v2.0 ║
║ Read-only Mode · No Files Modified ║
╚══════════════════════════════════════════════════════╝
━━━ I. Drive C Space Overview ━━━
Total Capacity: XXX GB | Used: XXX GB (XX%) | Available: XXX GB
Hidden Space Usage:
├─ Hibernation file(hiberfil.sys): XX GB ─ Suggestion: [✅Recommended to disable/⚠️Keep]
├─ Page file(pagefile.sys): XX GB ─ Suggestion: [✅Migratable to Drive D]
├─ System Restore Points: X ─ Suggestion: [⚠️Can clean up old ones]
└─ WinSxS Component Store: XX GB (Actual cleanable: X GB) ─ Suggestion: [✅Recommended to clean with Dism]
━━━ II. Summary of Cleanable Items ━━━
【✅ Highly Recommended to Delete】
├─ ☐ Windows Temporary Files XX MB ── Cleanup Command: ...
├─ ☐ User Temporary Files XX MB ── Cleanup Command: ...
├─ ☐ Thumbnail Cache XX MB ── Cleanup Command: ...
└─ ☐ System Log Files XX KB ── Cleanup Command: ...
【⚠️ Can Delete After Confirmation】
├─ ☐ Recycle Bin XX MB ── (70 files)
├─ ☐ Windows Update Cache XX MB ── (Ensure no updates are in progress)
└─ ...
【💻 Development Tool Caches】(Can be deleted OR migrated!)
├─ ☐ npm Cache XX MB ── Delete: npm cache clean --force
│ Migrate: npm config set cache "D:\..."
├─ ☐ node-gyp Cache XX MB ── Delete: Remove-Item ...
│ Migrate: Symbolic link to D:\...
├─ ☐ pip Cache XX MB ── Delete: pip cache purge
│ Migrate: PIP_CACHE_DIR=D:\...
├─ ☐ Yarn Cache XX MB ── Migrate: yarn config set cacheFolder
├─ ☐ pnpm Cache XX MB ── Migrate: pnpm set store-dir
├─ ☐ NuGet Cache XX MB ── Migrate: NuGet.Config
├─ ☐ Cargo(Rust) Cache XX MB ── Migrate: CARGO_HOME
├─ ☐ Maven Repository XX MB ── Migrate: settings.xml
└─ ☐ Gradle Cache XX MB ── Migrate: GRADLE_USER_HOME
━━━ III. 🔍 Top 20 Large Files on Drive C ━━━
#1 XX GB C:\xxx\xxx ── [Suggestion: xxx]
#2 XX GB C:\xxx\xxx ── [Suggestion: xxx]
...
━━━ IV. ⚠️ Items Requiring Manual Check ━━━
├─ 🔴 Suspicious Files in Drive C Root Directory (4)
│ Za3fb24eb1dd5a3.zip ── Please right-click to check properties and source
│ aa3fb24eb1dd5a3.zip ── Please right-click to check properties and source
│ sfs4.9 ── Please right-click to check properties and source
│ sml8.31 ── Please right-click to check properties and source
│
├─ 🔴 Docker/WSL Data XX GB ── Can be migrated to Drive D
└─ ...
━━━ V. 📦 One-Click Migration Guide (Move Data from Drive C to Drive D) ━━━
[See "Migration Method" in each category]🆕 v2.0 vs v1.0 对比
🆕 v2.0 vs v1.0 Comparison
| 功能 | v1.0 | v2.0 |
|---|---|---|
| 删除建议 | 仅标注风险等级(低/中/高) | ✅ 明确推荐/不推荐 + 理由 |
| 迁移方案 | ❌ 无 | ✅ 每个开发工具缓存都提供迁移方法 |
| 扫描深度 | 8个基础类别 | ✅ 20+类别 + 大文件TOP N + 系统隐藏空间 |
| 休眠/页面文件 | ❌ 未覆盖 | ✅ 含大小、建议、操作命令 |
| WinSxS/还原点 | ❌ 未覆盖 | ✅ Dism分析 + vssadmin清理 |
| 开发工具 | 仅npm/node-gyp | ✅ npm/yarn/pnpm/pip/cargo/maven/gradle/nuget |
| Docker/WSL | ❌ 未覆盖 | ✅ 含数据位置 + 迁移方法 |
| 大文件扫描 | ❌ 无 | ✅ TOP N 排行榜 |
| 用户文件夹 | ❌ 未覆盖 | ✅ 子目录大小排行 + Windows内置迁移方法 |
| Feature | v1.0 | v2.0 |
|---|---|---|
| Deletion Suggestions | Only marked risk level (low/medium/high) | ✅ Clear recommendation/not recommended + reasons |
| Migration Solutions | ❌ None | ✅ Migration methods provided for each development tool cache |
| Scanning Depth | 8 basic categories | ✅ 20+ categories + Top N large files + system hidden space |
| Hibernation/Page Files | ❌ Not covered | ✅ Includes size, suggestions, operation commands |
| WinSxS/Restore Points | ❌ Not covered | ✅ Dism analysis + vssadmin cleanup |
| Development Tools | Only npm/node-gyp | ✅ npm/yarn/pnpm/pip/cargo/maven/gradle/nuget |
| Docker/WSL | ❌ Not covered | ✅ Includes data location + migration methods |
| Large File Scanning | ❌ None | ✅ Top N ranking |
| User Folders | ❌ Not covered | ✅ Subdirectory size ranking + built-in Windows migration methods |
💬 与用户交互指南
💬 User Interaction Guide
对话流程
Conversation Flow
- 问候:告知开始深度扫描(只读模式)
- 执行扫描:运行上述全部类别的PowerShell命令
- 展示报告:按上述模板格式化输出
- 询问下一步:
- "你想让我帮你执行哪些清理?(我会逐一确认)"
- "或者你想迁移某些开发工具缓存到D盘?我可以帮你设置"
- "需要我帮你生成一份完整报告文档保存到桌面吗?"
- Greeting: Inform users that deep scanning is starting (read-only mode)
- Execute Scanning: Run all the above PowerShell commands for each category
- Display Report: Output in the formatted template above
- Ask Next Steps:
- "Which cleanup operations would you like me to perform? (I will confirm each one)"
- "Or would you like to migrate some development tool caches to Drive D? I can help you configure it"
- "Would you like me to generate a complete report document and save it to your desktop?"
示例回复
Sample Response
好的!我现在用 C盘分析器 v2.0 开始深度扫描你的C盘。🔍 只读模式,不会修改任何文件正在扫描:基础信息 → 隐藏空间 → 临时文件 → 开发工具缓存 → 大文件TOP N → 特殊占用...[展示完整报告]你想要:
- 清理某些项目? (告诉我编号,我帮你执行,每个都会先确认)
- 迁移开发工具缓存到D盘? (npm/node-gyp/pip/cargo等,我帮你改配置)
- 生成完整报告文档? (保存到桌面供你慢慢看)
本Skill旨在帮助你深度理解C盘空间去向,并提供删除和迁移两种释放空间的方案。
v2.0 — 2026-04-02
Okay! I'm starting a deep scan of your Drive C using Drive C Analyzer v2.0.🔍 Read-only mode, no files will be modifiedScanning in progress: Basic information → Hidden space → Temporary files → Development tool caches → Top N large files → Special space occupants...[Display complete report]Would you like to:
- Clean up certain items? (Tell me the numbers, I will execute them and confirm each one first)
- Migrate development tool caches to Drive D? (npm/node-gyp/pip/cargo, etc., I can help you modify configurations)
- Generate a complete report document? (Save to desktop for you to review later)
This Skill aims to help you deeply understand where Drive C space is being used, and provides two solutions to free up space: deletion and migration.
v2.0 — 2026-04-02