Hi, Adrien Muller
This looks less like a normal OneDrive folder and more like a broken macOS File Provider entry. Once macOS owns that CloudStorage placeholder, rm, xattr, diskutil, and Recovery Mode may still fail because the folder is not being treated as a regular folder.
Here are some suggestions you can try:
It is recommended that you temporarily reinstall the same OneDrive version, but do not sign in. Then run the reset script inside the app:
/Applications/OneDrive.app/Contents/Resources/ResetOneDriveApp.command
If it is the standalone build, use:
/Applications/OneDrive.app/Contents/Resources/ResetOneDriveAppStandalone.command
After that, restart the Mac, check ~/Library/CloudStorage, and remove the folders from Finder if macOS shows a delete prompt.
If that still fails, I would stop trying forced delete commands. At that point it is likely stale File Provider state inside macOS, not OneDrive itself. The supported route is to collect a sysdiagnose and open a case with Apple, since macOS no longer exposes a reliable public tool to manually purge broken File Provider domains.
Thank you for your patience in reading, I hope this information has been helpful to you.
If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment."
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.