It is not possible to delete the OneDrive file data from user’s local machine on their behalf.
Once the SharePoint Online library is synced to the user’s local drive, they can keep a copy of the files and folders, which is accessible offline without requiring authentication.
The files and folders will remain as local data after the user stops syncing with SharePoint Online, even if some of them do not save data on local drive, they carry an error symbol on the file icon.
If an Answer is helpful, please click "Accept Answer" and upvote it.
**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. **