Skip to Content

Solved: How to Delete a Stubborn Folder After Windows 11 Upgrade?


I’m facing a challenge in deleting a persistent folder on my computer. No matter what I do, I keep encountering an ‘Access Denied’ message when attempting to delete it.

This particular folder was created by SCCM and contains Windows 11 upgrade files. Even after the system upgrade is complete, this folder remains, causing frustration.

I’ve already tried taking ownership and disabling UAC, but I’m still stuck. I’m looking for suggestions or assistance from anyone who has ideas on how to successfully remove this folder. Please note that I’m unable to install third-party tools for this task. Currently, I’m using icacls.exe to reset permissions on the folder and its subfolders.


Certainly, here are the solution steps in a clear and expanded format:

Step 1: Change Folder Permissions

Open Command Prompt with administrative privileges. Type the following command and press Enter:

ICACLS.exe C:\foldername /grant:r Administrators:(OI)(CI)F /C

This command grants full control (F) of the folder and its contents (OI)(CI) to the Administrators group.

Step 2: Reset File Permissions

Still in Command Prompt with admin rights, enter the next command:

ICACLS.exe C:\foldername\*.* /reset /T /C

This command resets the permissions on all files and subfolders within ‘foldername’.

Step 3: Open PowerShell as Administrator

Now, open PowerShell with administrator privileges. To do this:

  1. Press the Windows key.
  2. Type “PowerShell.”
  3. Right-click on “Windows PowerShell” in the search results.
  4. Choose “Run as administrator.”

Step 4: Delete the Stubborn Folder

In the PowerShell window that opens, enter the following command and press Enter:

Remove-Item -Path 'C:\foldername' -Force -Recurse -ErrorAction SilentlyContinue

This PowerShell command forcefully deletes the ‘foldername’ directory and all its contents, and it does so silently, meaning it won’t display errors if there are any issues during deletion.

These steps should help you remove the stubborn folder from your system.

Alex Lim is a certified IT Technical Support Architect with over 15 years of experience in designing, implementing, and troubleshooting complex IT systems and networks. He has worked for leading IT companies, such as Microsoft, IBM, and Cisco, providing technical support and solutions to clients across various industries and sectors. Alex has a bachelor’s degree in computer science from the National University of Singapore and a master’s degree in information security from the Massachusetts Institute of Technology. He is also the author of several best-selling books on IT technical support, such as The IT Technical Support Handbook and Troubleshooting IT Systems and Networks. Alex lives in Bandar, Johore, Malaysia with his wife and two chilrdren. You can reach him at [email protected] or follow him on Website | Twitter | Facebook

    Ads Blocker Image Powered by Code Help Pro

    Your Support Matters...

    We run an independent site that is committed to delivering valuable content, but it comes with its challenges. Many of our readers use ad blockers, causing our advertising revenue to decline. Unlike some websites, we have not implemented paywalls to restrict access. Your support can make a significant difference. If you find this website useful and choose to support us, it would greatly secure our future. We appreciate your help. If you are currently using an ad blocker, please consider disabling it for our site. Thank you for your understanding and support.