Permanently delete items from One Drive

It seems that whenever I delete any files on my One Drive remote, the files end up in the recycle bin of One Drive. If I'm not wrong, previously it was impossible to permanently delete files from One Drive due to the limitations of the API. However recently (27/10/2023) Microsoft added a way to permanently delete items without them ending up on the recycle bin as shown here. I was wondering if it's possible to implement a feature in rclone that'd allow users to permanently delete files from their One Drive remote. A flag similar to Google Drive's "--drive-use-trash=false" could be used in order to permanently delete files from One Drive remotes.

Maybe it could be possible but AFAIK it is not critical as unlike Google, Onedrive thrash does not count against your storage quota. So not sure why to spend time on it:)

Here example with free onedrive account (5GB quota):

$ rclone about onedrive_test2:

Total:   5 GiB
Used:    3.900 GiB
Free:    1.100 GiB
Trashed: 3.234 GiB

Of course if somebody sends PR it will be welcomed. But I think it is nothing urgent.

Also as it seems quite easy thing to implement maybe you would like to have a go on it?

1 Like

In my experience with E5 and E3 licenses for OneDrive for Business, recycle bin does count against quota. Not sure about OneDrive Personal as I rarely use it.


Oh thank you, I wasn't aware that trash doesn't count against my storage quote. Also no for sure I'll have a go on it trying to implement it.

I just tested to delete my trash in my sharepoints sites.

Rclone about will tell you, it's freed up and added to free space

before and after:

rclone about drive:
Total:   25 TiB
Used:    23.894 TiB
Free:    1.047 TiB
Trashed: 60.899 GiB

rclone about drive:
Total:   25 TiB
Used:    23.894 TiB
Free:    1.106 TiB
Trashed: 0 B

updating the Website-Metrics in Sharepoint Admin tells me, that the free quota has increased.

So it does count into quota!

AFAIK what I read from the docs is, that MS doesnt provide an API to permanently delete files.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.