I want to delete the cygwin folder and some other folders through powershell terminal or command prompt but I get access denied I tried to change the folder permission but get access denied as well.
I’ve tried
Remove-Item C:\cygwin
or even
Remove-Item -Recurse -Force C:\cygwin
any solution? isn’t there a way using the terminal to delete anything and everything you want no excuses.
‘Access denied’ type errors are generally permissions issues, so make sure the user you’re running the terminal as has appropriate permissions (run as Admin if needed).
Otherwise, to completely ‘no questions asked’ delete something, you’ll need to use CMD as there are some quirks about using .NET that makes PowerShell useless in certain situations. However, I use the following function from inside of PowerShell that uses CMD to delete anything.
This can then be invoked with
die C:\MyEvilDir.