彻底解决 Edge 浏览器自动生成 edge_BITS_ 临时文件夹问题
很多 Windows 用户都会遇到一个困扰:在 C:\Users\你的用户名\AppData\Local\Temp 目录下,会自动生成大量以 edge_BITS_ 开头的临时文件夹,且删除后反复出现。本文将提供一套完整的解决方案,从清理到彻底阻止生成,一次性解决问题。
🔍 问题根源
这些文件夹是由 Windows 的 后台智能传输服务(BITS) 和 Edge 浏览器的自动更新机制共同生成的。它们本应在下载任务完成后自动删除,但当网络中断、更新失败或服务异常时,就会残留下来,甚至反复生成。
🛠️ 完整解决方案
一、一键清理现有文件夹
如果你只想快速清理当前已存在的 edge_BITS_ 文件夹,可以使用以下 PowerShell 脚本,无需复杂操作。
1. 清理脚本制作
-
打开记事本,复制粘贴以下代码:
<# 脚本名称:清理 edge_BITS_ 临时文件夹.ps1 功能:一键清理 Temp 目录下所有 edge_BITS_ 开头的文件夹 #> # 定义目标目录(请替换为你的 Temp 路径) $tempDir = "C:\Users\Journeyer\AppData\Local\Temp" Write-Host "`n📌 开始清理 edge_BITS_ 临时文件夹..." -ForegroundColor Cyan Write-Host "目标目录:$tempDir`n" try { # 关闭可能占用文件的 Edge 进程 Write-Host "🔧 正在关闭占用的 Edge 进程..." Get-Process -Name msedge -ErrorAction SilentlyContinue | Stop-Process -Force -ErrorAction SilentlyContinue # 查找并删除目标文件夹 $targetFolders = Get-ChildItem -Path $tempDir -Filter "edge_BITS_*" -Directory -ErrorAction Stop if ($targetFolders.Count -eq 0) { Write-Host "`n✅ 未找到 edge_BITS_ 相关文件夹,无需清理!" -ForegroundColor Green pause exit } Write-Host "`n🗑️ 找到 $($targetFolders.Count) 个文件夹,正在删除..." $targetFolders | Remove-Item -Recurse -Force -ErrorAction Stop # 验证清理结果 $remainingFolders = Get-ChildItem -Path $tempDir -Filter "edge_BITS_*" -Directory -ErrorAction SilentlyContinue if ($remainingFolders.Count -eq 0) { Write-Host "`n✅ 清理完成!所有 edge_BITS_ 文件夹已删除" -ForegroundColor Green } else { Write-Host "`n⚠️ 部分文件夹未清理(可能被系统占用),剩余 $($remainingFolders.Count) 个" -ForegroundColor Yellow } } catch { Write-Host "`n❌ 清理失败:$($_.Exception.Message)" -ForegroundColor Red } Write-Host "`n按任意键退出..." -ForegroundColor Gray pause >nul - 点击「文件 → 另存为」,文件名设为
清理edge_BITS文件夹.ps1,保存类型选择「所有文件」。
2. 使用方法
- 右键点击脚本文件,选择「以管理员身份运行」。
- 脚本会自动关闭占用文件的 Edge 进程,并批量删除所有
edge_BITS_文件夹。
二、彻底阻止文件夹生成(根源解决)
如果希望从根本上杜绝这些文件夹的生成,需要配合修改系统服务和目录权限。
1. 禁用 BITS 服务自动启动
- 按
Win键,输入powershell,右键选择「以管理员身份运行」。 - 执行以下命令:
# 将 BITS 服务设置为手动启动 Set-Service -Name BITS -StartupType Manual # 立即停止 BITS 服务 Stop-Service -Name BITS -Force
2. 创建占位符文件拦截生成
在缓存目录中创建一个同名文件,让系统无法再创建 edge_BITS_ 文件夹:
$cachePath = "$env:LOCALAPPDATA\Microsoft\Edge\User Data\Default\Cache"
# 创建占位符文件
New-Item -Path "$cachePath\edge_BITS_" -ItemType File -Force
# 设置为只读
Set-ItemProperty -Path "$cachePath\edge_BITS_" -Name IsReadOnly -Value $true
3. 禁用 Edge 自动更新(可选)
如果仍有生成,可以进一步禁用 Edge 的更新任务:
# 禁用 Edge 更新任务
schtasks /change /tn "Microsoft\EdgeUpdate\MicrosoftEdgeUpdateTaskMachineCore" /disable
schtasks /change /tn "Microsoft\EdgeUpdate\MicrosoftEdgeUpdateTaskMachineUA" /disable
# 禁用 Edge 更新服务
Set-Service -Name edgeupdate -StartupType Disabled
Set-Service -Name edgeupdatem -StartupType Disabled
🎯 效果验证
执行完以上步骤后,你可以:
- 检查
C:\Users\Journeyer\AppData\Local\Temp目录,确认所有edge_BITS_文件夹已被清理。 - 等待一段时间后,再次查看该目录,确认没有新的
edge_BITS_文件夹生成。
如果问题依然存在,可以运行脚本进行二次清理,或检查 Edge 浏览器是否存在损坏,必要时可重置 Edge 浏览器。
图文版:彻底解决 Edge 浏览器 edge_BITS_ 临时文件夹反复生成问题
🎯 问题说明
在你的电脑 C:\Users\你的用户名\AppData\Local\Temp 目录下,会自动生成大量以 edge_BITS_ 开头的临时文件夹,删除后还会反复出现。本指南将带你一步步清理并彻底阻止它。
🛠️ 第一步:制作并运行一键清理脚本
这个脚本可以快速删除所有现有的 edge_BITS_ 文件夹,并且自动关闭占用文件的 Edge 进程。
1. 打开记事本
- 按下
Win键,输入notepad,然后按回车打开记事本。 - 或者直接在桌面右键 → 新建 → 文本文档。
2. 复制脚本代码
把下面的完整代码复制粘贴到记事本里:
<#
脚本名称:清理 edge_BITS_ 临时文件夹.ps1
功能:一键清理 Temp 目录下所有 edge_BITS_ 开头的文件夹
#>
# 定义目标目录(请替换为你的 Temp 路径)
$tempDir = "C:\Users\Journeyer\AppData\Local\Temp"
Write-Host "`n📌 开始清理 edge_BITS_ 临时文件夹..." -ForegroundColor Cyan
Write-Host "目标目录:$tempDir`n"
try {
# 关闭可能占用文件的 Edge 进程
Write-Host "🔧 正在关闭占用的 Edge 进程..."
Get-Process -Name msedge -ErrorAction SilentlyContinue | Stop-Process -Force -ErrorAction SilentlyContinue
# 查找并删除目标文件夹
$targetFolders = Get-ChildItem -Path $tempDir -Filter "edge_BITS_*" -Directory -ErrorAction Stop
if ($targetFolders.Count -eq 0) {
Write-Host "`n✅ 未找到 edge_BITS_ 相关文件夹,无需清理!" -ForegroundColor Green
pause
exit
}
Write-Host "`n🗑️ 找到 $($targetFolders.Count) 个文件夹,正在删除..."
$targetFolders | Remove-Item -Recurse -Force -ErrorAction Stop
# 验证清理结果
$remainingFolders = Get-ChildItem -Path $tempDir -Filter "edge_BITS_*" -Directory -ErrorAction SilentlyContinue
if ($remainingFolders.Count -eq 0) {
Write-Host "`n✅ 清理完成!所有 edge_BITS_ 文件夹已删除" -ForegroundColor Green
} else {
Write-Host "`n⚠️ 部分文件夹未清理(可能被系统占用),剩余 $($remainingFolders.Count) 个" -ForegroundColor Yellow
}
}
catch {
Write-Host "`n❌ 清理失败:$($_.Exception.Message)" -ForegroundColor Red
}
Write-Host "`n按任意键退出..." -ForegroundColor Gray
pause >nul
3. 保存为 PowerShell 脚本
- 点击记事本顶部的「文件」→「另存为」。
- 在「保存类型」下拉菜单中,选择「所有文件」。
- 文件名输入:
清理edge_BITS文件夹.ps1(必须带.ps1后缀)。 - 保存位置选在桌面,方便后续查找。
4. 运行脚本
- 找到桌面上的
清理edge_BITS文件夹.ps1文件。 - 右键点击它,选择「以管理员身份运行」。
- 脚本会自动执行,清理完成后会显示结果,按任意键退出即可。
🛡️ 第二步:彻底阻止文件夹生成(根源解决)
1. 打开管理员模式的 PowerShell
- 按下
Win键,输入powershell。 - 在搜索结果中,右键点击「Windows PowerShell」,选择「以管理员身份运行」。
2. 禁用 BITS 服务自动启动
在 PowerShell 中依次输入以下命令,每条输完按回车:
# 将 BITS 服务设置为手动启动
Set-Service -Name BITS -StartupType Manual
# 立即停止 BITS 服务
Stop-Service -Name BITS -Force
执行完成后,输入 Get-Service -Name BITS 来验证,显示 Status: Stopped 和 StartupType: Manual 即为成功。
3. 创建占位符文件拦截生成
复制下面的命令到 PowerShell 并执行:
$cachePath = "$env:LOCALAPPDATA\Microsoft\Edge\User Data\Default\Cache"
# 创建占位符文件
New-Item -Path "$cachePath\edge_BITS_" -ItemType File -Force
# 设置为只读
Set-ItemProperty -Path "$cachePath\edge_BITS_" -Name IsReadOnly -Value $true
这会在 Edge 的缓存目录里创建一个名为 edge_BITS_ 的文件,让系统无法再创建同名的文件夹。
4. (可选)禁用 Edge 自动更新
如果文件夹仍在生成,可以进一步禁用 Edge 的更新服务和任务:
powershell
# 禁用 Edge 更新任务
schtasks /change /tn "Microsoft\EdgeUpdate\MicrosoftEdgeUpdateTaskMachineCore" /disable
schtasks /change /tn "Microsoft\EdgeUpdate\MicrosoftEdgeUpdateTaskMachineUA" /disable
# 禁用 Edge 更新服务
Set-Service -Name edgeupdate -StartupType Disabled
Set-Service -Name edgeupdatem -StartupType Disabled
✅ 效果验证
- 打开
C:\Users\Journeyer\AppData\Local\Temp目录,确认所有edge_BITS_文件夹已被清理。 - 等待 1-2 天,再次查看该目录,确认没有新的
edge_BITS_文件夹生成。 - 如果仍有问题,可以再次运行第一步的清理脚本。
禁用了 BITS 服务浏览器崩溃问题 请重新执行如下命令
按 Win 键,输入 powershell,右键选择「以管理员身份运行」。
恢复 BITS 服务
在 PowerShell 中执行以下命令:
# 将 BITS 服务恢复为自动启动
Set-Service -Name BITS -StartupType Automatic
# 立即启动 BITS 服务
Start-Service -Name BITS
验证恢复成功
输入命令 Get-Service -Name BITS,如果显示 Status: Running 和 StartupType: Automatic,就说明服务已经正常运行了。
重新解决 edgeBITS 文件夹问题(不影响其他浏览器)
既然不能禁用 BITS 服务,我们换一种更安全的方案:
删除之前创建的占位符文件
在 PowerShell 中执行:
$cachePath = "$env:LOCALAPPDATA\Microsoft\Edge\User Data\Default\Cache"
Remove-Item -Path "$cachePath\edge_BITS_" -Force -ErrorAction SilentlyContinue
改用自动清理任务(安全且不影响其他软件)
我可以帮你创建一个 Windows 任务计划,让系统每天自动清理 edgeBITS 文件夹,既不用禁用核心服务,也能保持电脑干净。
未经允许不得转载作者:
GRUD,
转载或复制请以
超链接形式
并注明出处
科技之星网站 。
原文地址:
《
彻底解决 Edge 浏览器自动生成 edge_BITS_ 临时文件夹问题》
发布于
2026-1-24
(禁止商用或其它牟利行为)版权归原作者本人所有,您必须在下载后24小时内删除, 感谢您的理解与合作
文章标题:彻底解决 Edge 浏览器自动生成 edge_BITS_ 临时文件夹问题
文章链接:https://kejizhixing.com/post-1330.html
本站所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议,转载请注明来自GRUD !



















评论 抢沙发
评论前必须登录!
立即登录 注册