To remove a file that someone shared with you from appearing in OneDrive, use the Shared view in OneDrive on the web and hide it from there. This only removes it from the view; it does not delete the file for others.
For a file shared with you:
- Go to OneDrive on the web and sign in.
- In the left navigation, select Shared.
- For OneDrive personal:
- Select the file or folder you want to remove from your Shared view.
- Select Hide from Shared.
- For OneDrive for work or school:
- Select the file or folder you want to remove from the Shared list.
- Select Hide from Shared.
If instead a shared folder shortcut is showing in My files and you want to remove it:
- In OneDrive on the web, go to Files.
- Select the shared folder shortcut.
- Select Remove shortcut from My files.
- This removes only the shortcut from the account; it does not delete the folder or affect other users.
If Hide from Shared or Remove shortcut from My files appears not to work, refresh the browser and check again. If the owner has already stopped sharing or deleted the item, it may disappear automatically from the Shared view.
Note: Deleting a shared item (instead of hiding/removing the shortcut) can delete it for everyone, so use Hide from Shared or Remove shortcut from My files rather than Delete when the goal is only to remove it from the own OneDrive.
References: