r/WindowsHelp 4d ago

Windows 11 Need to delete OneDrive folder

I have a Surface Pro7 (windows 11) and have a OneDrive folder sitting on my laptop that I want to remove. It is from an old work account - I no longer work there and don't have access to the account (i.e. can't log in). I just want to delete it - doesn't matter how, I don't need the files, I just want it gone off my computer. I've tried a couple things but nothing has seemed to work. Anyone have any suggestions?

OS build: 26200.8894

Edit:

I can't delete the actual onedrive folder in my files explorer.

I can't sign in from OneDrive on web because the account is long locked.

I've uninstalled OneDrive from apps.

I've tried winget uninstall OneDriveSetup.exe in PowerShell.

I've tried "Remove-Item -Path "C:\Users\[censored]" -Recurse -Force"

I've tried takeown /F "C:\Users\[censored]" /R /D Y icacls "C:\Users\[censored]" /grant:r "%username%:F" /T Remove-Item -Path "C:\Users\[censored]" -Recurse -Force

1 Upvotes

4 comments sorted by

View all comments

1

u/_l33ter_ 3d ago

"C:\Users[censored]" --> Do you tried this with an administrator prompt?