{"id":80705,"date":"2026-04-17T12:16:33","date_gmt":"2026-04-17T06:46:33","guid":{"rendered":"https:\/\/www.winhelponline.com\/blog\/?p=80705"},"modified":"2026-04-17T12:16:33","modified_gmt":"2026-04-17T06:46:33","slug":"cannot-remove-windows-bt-setup-folder","status":"publish","type":"post","link":"https:\/\/www.winhelponline.com\/blog\/cannot-remove-windows-bt-setup-folder\/","title":{"rendered":"[Fix] Can&#8217;t Remove the $WINDOWS.~BT Folder"},"content":{"rendered":"<p>The Windows Setup procedure or the Media Creation Tool may fail to clear the temporary setup files in some cases. As a result, gigabytes of disk space will be occupied by those folders. When you\u00a0<span style=\"box-sizing: border-box; margin: 0px; padding: 0px;\">manually delete the temporary setup folder\u00a0<strong>$WINDOWS.~BT<\/strong><\/span>, you may receive an Access Denied error.<!--more--><\/p>\n<pre class=\"err\"><strong>File Access Denied<\/strong>\r\n\r\nYou need permission to perform this action.\r\n\r\nYou need permission from TrustedInstaller to make changes to this file.<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-80708\" src=\"https:\/\/www.winhelponline.com\/blog\/wp-content\/uploads\/2026\/04\/temporary-setup-files-error-access-denied.jpg\" alt=\"clear temporary setup folder $WINDOWS.~BT access denied\" width=\"670\" height=\"444\" \/><\/p>\n<p>Let&#8217;s see how to clear the temporary setup folders, namely, <strong>$WINDOWS.~BT<\/strong>, <strong>$WINDOWS.~WS<\/strong>, and <strong>ESD<\/strong>.<\/p>\n<h2>Resolution<\/h2>\n<h3>Method 1: Using Disk Cleanup<\/h3>\n<ol>\n<li>Launch the Disk Cleanup (<strong>cleanmgr.exe<\/strong>) tool.<\/li>\n<li>Select the <strong>C:<\/strong> drive and click OK.<\/li>\n<li>Click <strong>Clean up system files. <\/strong>Disk Cleanup will now relaunch as administrator.<\/li>\n<li>Select the <strong>C:<\/strong> drive and click OK.<\/li>\n<li>Enable the <strong>Temporary Windows installation files<\/strong> checkbox, and click OK.<br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-80706\" src=\"https:\/\/www.winhelponline.com\/blog\/wp-content\/uploads\/2026\/04\/temporary-setup-files-disk-cleanup.png\" alt=\"clear temporary setup folder $WINDOWS.~BT\" width=\"375\" height=\"454\" \/><\/li>\n<li>Click the Delete Files button when you see the &#8220;<em><strong>Are you sure you want to permanently delete these files?<\/strong><\/em>&#8221; prompt.That&#8217;s it. The Disk Cleanup tool will now delete the following folders:\n<pre>C:\\ESD\\Download\r\n\r\nC:\\$WINDOWS.~BT\r\n\r\nC:\\$WINDOWS.~WS<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-80707\" src=\"https:\/\/www.winhelponline.com\/blog\/wp-content\/uploads\/2026\/04\/temporary-setup-files-1.png\" alt=\"clear temporary setup folder $WINDOWS.~BT\" width=\"361\" height=\"137\" \/><\/li>\n<\/ol>\n<div class=\"rp\"><strong>RELATED:<\/strong> <a href=\"https:\/\/www.winhelponline.com\/blog\/delete-windows-old-folder-previous-versions\/\">How to Delete Windows.old folder [Previous versions of Windows]<\/a><\/div>\n<hr \/>\n<h3>Method 2: Using Command Prompt<\/h3>\n<p>If the Disk Cleanup tool doesn&#8217;t show the <strong>Temporary Windows installation files<\/strong> checkbox or doesn&#8217;t clear the temporary setup folders, you can use the admin Command Prompt to delete those folders.<\/p>\n<p>Open Command Prompt (admin) and run these commands:<\/p>\n<pre class=\"cmd\">del \/s \/f \/q \"C:\\$WINDOWS.~BT\"\r\ndel \/s \/f \/q \"C:\\$WINDOWS.~WS\"\r\ndel \/s \/f \/q \"C:\\ESD\\Download\"\r\n\r\ntakeown \/F \"C:\\$WINDOWS.~BT\" \/A \/R \/D Y\r\nicacls \"C:\\$WINDOWS.~BT\" \/grant *S-1-5-32-544:F \/T \/C \/Q\r\nrd \/s \/q \"C:\\$WINDOWS.~BT\"\r\n\r\ntakeown \/F \"C:\\$WINDOWS.~WS\" \/A \/R \/D Y\r\nicacls \"C:\\$WINDOWS.~WS\" \/grant *S-1-5-32-544:F \/T \/C \/Q\r\nrd \/s \/q \"C:\\$WINDOWS.~WS\"\r\nrd \/s \/q \"C:\\ESD\\Download\"\r\n<\/pre>\n<hr \/>\n<h3>Method 3: Using the TrustedInstaller Command Prompt<\/h3>\n<p>Download the <a href=\"https:\/\/www.nirsoft.net\/utils\/advanced_run.html\" target=\"_blank\" rel=\"noopener\">Advanced Run<\/a> utility from Nirsoft and run it.<\/p>\n<p>Using Advanced Run, launch <strong>CMD.exe<\/strong> as TrustedInstaller. Reference: <a href=\"https:\/\/www.winhelponline.com\/blog\/run-program-as-trustedinstaller-locked-registry-keys-files\/#advancedrun\">How to Run Programs as TrustedInstaller<\/a><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-31199\" src=\"https:\/\/www.winhelponline.com\/blog\/wp-content\/uploads\/2016\/08\/advancedrun-screen.png\" alt=\"advancedrun - trustedinstaller\" width=\"760\" height=\"585\" \/><\/p>\n<p>In the TrustedInstaller Command Prompt, run the following commands:<\/p>\n<pre class=\"cmd\">rd \/s \/q \"C:\\$WINDOWS.~BT\"\r\n\r\nrd \/s \/q \"C:\\$WINDOWS.~WS\"\r\n\r\nrd \/s \/q \"C:\\ESD\\Download\"\r\n<\/pre>\n<p>That&#8217;s it!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The Windows Setup procedure or the Media Creation Tool may fail to clear the temporary setup files in some cases. As a result, gigabytes of disk space will be occupied by those folders. When you\u00a0manually delete the temporary setup folder\u00a0$WINDOWS.~BT, you may receive an Access Denied error.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[6,8,869],"tags":[106,191],"class_list":["post-80705","post","type-post","status-publish","format-standard","hentry","category-utilities","category-windows-10","category-windows-11","tag-command-prompt","tag-error-messages"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack-related-posts":[{"id":4640,"url":"https:\/\/www.winhelponline.com\/blog\/automatically-clear-temp-files-every-login-using-disk-cleanup-batch-file\/","url_meta":{"origin":80705,"position":0},"title":"Automatically Clear Temp Files Using Disk Cleanup, Storage Sense or Batch file","author":"Ramesh","date":"November 22, 2016","format":false,"excerpt":"The TEMP directory (%temp%) gets bloated over time as applications store data over there and don't always remove the files and folders they created. And, software installers extract the contents of the setup packages to the %temp% folder and fail to do the cleanup act when the installation is complete.\u2026","rel":"","context":"In &quot;Windows&quot;","block_context":{"text":"Windows","link":"https:\/\/www.winhelponline.com\/blog\/category\/microsoft\/windows\/"},"img":{"alt_text":"windows 10 storage settings cleanup options","src":"https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2016\/11\/storage-settings-cleanup-options.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2016\/11\/storage-settings-cleanup-options.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2016\/11\/storage-settings-cleanup-options.png?resize=525%2C300&ssl=1 1.5x"},"classes":[]},{"id":10740,"url":"https:\/\/www.winhelponline.com\/blog\/free-up-hard-disk-space-windows\/","url_meta":{"origin":80705,"position":1},"title":"How to Free Up Gigabytes of Disk Space in Windows","author":"Ramesh","date":"August 18, 2019","format":false,"excerpt":"Windows 10 updates, especially the feature updates, consume enormous disk space as Windows stores the older copies in case you want to roll back to the previous version. Hard disk drives have become cheaper and affordable nowadays. A 1 TB SATA HDD costs less than $50. But, if you're using\u2026","rel":"","context":"In &quot;Utilities&quot;","block_context":{"text":"Utilities","link":"https:\/\/www.winhelponline.com\/blog\/category\/utilities\/"},"img":{"alt_text":"chrome cache localstorage service worker cache","src":"https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2019\/08\/chrome-storage-dev-tools.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2019\/08\/chrome-storage-dev-tools.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2019\/08\/chrome-storage-dev-tools.png?resize=525%2C300&ssl=1 1.5x, https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2019\/08\/chrome-storage-dev-tools.png?resize=700%2C400&ssl=1 2x"},"classes":[]},{"id":4491,"url":"https:\/\/www.winhelponline.com\/blog\/disk-cleanup-wipe-out-temp-folder-contents-completely-lastaccess\/","url_meta":{"origin":80705,"position":2},"title":"Why doesn&#8217;t Disk Cleanup Clear the Temp Folder Contents Completely","author":"Ramesh","date":"November 1, 2016","format":false,"excerpt":"Disk Cleanup (Cleanmgr.exe) is a built-in tool in Windows that offers some useful cleanup options not available in other 3rd party cleanup tools. It can remove superseded device drivers, Temporary Files, Internet Explorer cache, obsolete Windows Updates, Previous Windows Installation (Windows.old) folder, and much more. But you may be wondering\u2026","rel":"","context":"In &quot;Windows&quot;","block_context":{"text":"Windows","link":"https:\/\/www.winhelponline.com\/blog\/category\/microsoft\/windows\/"},"img":{"alt_text":"dism servicing files in temp folder","src":"https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2016\/11\/dism-servicing-files-in-temp.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2016\/11\/dism-servicing-files-in-temp.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2016\/11\/dism-servicing-files-in-temp.png?resize=525%2C300&ssl=1 1.5x"},"classes":[]},{"id":1590,"url":"https:\/\/www.winhelponline.com\/blog\/delete-windows-old-folder-previous-versions\/","url_meta":{"origin":80705,"position":3},"title":"How to Delete Windows.old folder [Previous versions of Windows]","author":"Ramesh","date":"February 6, 2016","format":false,"excerpt":"Windows Operating System upgrades and version updates would leave plenty of files behind in the system drive. This is because Windows keeps the files from the previous versions of Windows in a separate folder in case the user wants to roll back the major update (or OS upgrade). For instance,\u2026","rel":"","context":"In &quot;Windows 10&quot;","block_context":{"text":"Windows 10","link":"https:\/\/www.winhelponline.com\/blog\/category\/microsoft\/windows\/windows-10\/"},"img":{"alt_text":"how to delete windows.old folder","src":"https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2016\/02\/cortana-localstate-folder-delete.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2016\/02\/cortana-localstate-folder-delete.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2016\/02\/cortana-localstate-folder-delete.png?resize=525%2C300&ssl=1 1.5x"},"classes":[]},{"id":19513,"url":"https:\/\/www.winhelponline.com\/blog\/windows-update-error-0xc19001e1-windows-10\/","url_meta":{"origin":80705,"position":4},"title":"[Fix] Windows Update Error 0XC19001E1 in Windows 10","author":"Ramesh","date":"October 25, 2020","format":false,"excerpt":"On some systems, the error 0XC19001E1 may occur when installing a Windows 10 feature update -- e.g., when upgrading from version 1903 to 2004, 2004 to 20H1, etc. The 0XC19001e1 error is one of the vaguest error messages of all the Windows Update errors. Feature update to Windows 10, version\u2026","rel":"","context":"In &quot;Windows 10&quot;","block_context":{"text":"Windows 10","link":"https:\/\/www.winhelponline.com\/blog\/category\/microsoft\/windows\/windows-10\/"},"img":{"alt_text":"windows 10 inplace upgrade","src":"https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2020\/10\/w10-inplace-upgrade.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2020\/10\/w10-inplace-upgrade.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2020\/10\/w10-inplace-upgrade.png?resize=525%2C300&ssl=1 1.5x, https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2020\/10\/w10-inplace-upgrade.png?resize=700%2C400&ssl=1 2x"},"classes":[]},{"id":38,"url":"https:\/\/www.winhelponline.com\/blog\/serious-disk-cleanup-problem-caused-by-broken-registration\/","url_meta":{"origin":80705,"position":5},"title":"Serious Disk Cleanup Problem in Windows caused by Broken Registration","author":"Ramesh","date":"February 29, 2008","format":false,"excerpt":"Reader's Query:\u00a0\u00a0\u00a0I have a 160GB Western Digital Hard Drive partitioned into a 40GB Operating System partition and the other 120GB for my files. However, when I run Disk Cleanup utility from within Vista Ultimate, it shows multiple 131GB options for me to clean up. After I clicked OK to clean\u2026","rel":"","context":"In &quot;Windows&quot;","block_context":{"text":"Windows","link":"https:\/\/www.winhelponline.com\/blog\/category\/microsoft\/windows\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2008\/02\/cleanmgr_risk.gif?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]}],"_links":{"self":[{"href":"https:\/\/www.winhelponline.com\/blog\/wp-json\/wp\/v2\/posts\/80705","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.winhelponline.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.winhelponline.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.winhelponline.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.winhelponline.com\/blog\/wp-json\/wp\/v2\/comments?post=80705"}],"version-history":[{"count":0,"href":"https:\/\/www.winhelponline.com\/blog\/wp-json\/wp\/v2\/posts\/80705\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.winhelponline.com\/blog\/wp-json\/wp\/v2\/media?parent=80705"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.winhelponline.com\/blog\/wp-json\/wp\/v2\/categories?post=80705"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.winhelponline.com\/blog\/wp-json\/wp\/v2\/tags?post=80705"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}