Delete old backup .md files

Currently I use OneDrive for backup.
In Apps/Joplin I find a lot of .md files.
I would like to delete old .md files belonging to version -1, -2, etc.
How do I do it ?

This might be a bad idea. AFAIK these files are incremental, so if you delete one in the chain of the history, you will end up with a broken note.
But I could be wrong.

@laurent how is this handled? e.g. if you change the note history from 10 to 5. In that case the deletion service must basically create a new ancestor note from the first 5 notes and then delete those 5 notes, right?

May I suggest a new feature:
Change amount of versions

Indeed that shouldn't be done because they are diff so if you delete any of them the whole history will be lost.

But generally the way to "delete old .md files" is to delete the notes you don't need locally and sync.

No, I meant via the UI. One can change the number of days to keep the history. So reducing the number must be supported, right?
I was just asking about the internals, because in such a case, some service in Joplin must do what I described earlier. Otherwise people would destroy their notes when they reduce the number of days to keep the history.

Or did you mean that people should not reduce the number of days to keep the history in the UI? In that case this must be stated in the documentation with big fat red letters.

Right, sorry I misread the question. Whenever the service deletes revisions, of course it makes sure to rebase the history so that the revisions that remain are still valid. In practice it means merging all the diff that are going to be deleted in the new first revision of the chain.

Changing the number of days in the UI will just change what revisions are kept or deleted when the service runs.

Thanks for the clarification.