Deleting files when restoring older version

It sounds like you’re looking for something similar to what’s described in this topic:

Duplicati doesn’t delete anything during a restore as it’s too easy to type a wrong path or forget you’ve got an important not-yet-backud-up file in the restore location which could cause you to lose data.

So while Duplicati can restore specific versions of individual files that it has backed up, it doesn’t restore “snapshots” of what a folder looked like at the time of the backup (meaning it won’t delete newer files that didn’t exist at the time of he backup).

As @kees-z mentioned, you could delete the source folder yourself before doing a restore or consider restoring to a different folder then using a compare tool such as BeyondCompare, K-Diff, WinDiff, Krusader, etc. to manually get rid of the “newer” files you don’t want.

Note that if you think a “forward looking” restore might be a useful feature you could consider adding an issue over at Issues · duplicati/duplicati · GitHub describing how you think it could work.

For example, a “–forward-looking-restore” type flag could indeed look at files created AFTER the version being restored and safely delete them IF they exist in future backup sets. But this still wouldn’t handle files (or changes) that had not been backed up yet. Plus, depending on retention-policy settings it’s possible the “future-version” being held in the Duplicati backups could get pruned out AFTER doing the “past-version” restore - so scenarios like that should be considered and explained in documentation.