How do I get back the earlier version of a file I saved over?
Deleting a file is the easy case. Saving over it with something worse is the hard one, and the recovery is different — version history rather than the recycle bin. Where to look, in what order, and how long you have.
- Difficulty
- beginner
- Time
- 20 min
- Read
- 8 min
- Safety
- caution
Short answer
If the file lives in a cloud-synced folder — OneDrive, Google Drive, Dropbox, iCloud Drive — sign into that service in a browser, find the file, and look for version history. All of them keep previous versions and restoring one takes seconds. For a purely local file, the routes are the program's own version history, Windows' previous versions, or Time Machine on a Mac. Act quickly: all of these have limits, and further saves push the version you want further away.
There is a particular sinking feeling in realising that a file still exists and no longer contains what you needed. A day's work saved over the wrong version. A spreadsheet where a formula was dragged over three hundred rows of data. A photograph edited and flattened. A shared document someone else tidied up. None of these are deletions, so nothing is in the bin, and the file recovery tools people reach for are looking for the wrong thing entirely. The correct answer is version history, which almost every modern storage system keeps and almost nobody knows how to open — and once you have used it once, it becomes the first thing you check rather than the last.
Safety
Step by step
- Stop working on the file, and leave any open program alone.Every further save reduces your options, and closing the program can discard temporary copies that are still on disk. If the ruined version is on screen and you have not saved yet, use undo repeatedly first — that is the fastest recovery there is, and it disappears the moment the program closes.
- Work out where the file actually lives, because it determines the method.A file in a folder that syncs to a cloud service has version history at the service. A file only on the computer's own drive relies on the operating system or the program. On Windows, the OneDrive folder is easy to miss because Desktop and Documents are often redirected into it — the catalogue has a guide on exactly that, and it is good news here.
- Use the cloud service's version history first, through a browser.Sign into the service on the web, find the file, and look for version history or manage versions in its menu. You will see a list of dated versions and you can preview before restoring. Restoring makes the old version current and keeps the newer one in the list, so this is not a destructive action — which is why it is the first thing to try.
- Know that office documents have their own version history as well.Documents stored in a cloud service and opened in the matching office application usually offer version history from inside the program, often with a per-edit list and named contributors. For collaborative documents this is more precise than the file-level history, because it shows who changed what and when.
- On Windows, check previous versions for a local file.The properties of a file or folder may have a previous versions tab, populated from restore points and from the file history feature if it is enabled. It is not always available, because it depends on those being switched on. Where it exists it recovers whole folders as well as single files.
- On a Mac, use Time Machine or the program's own revert.Time Machine restores a specific file from any backup, and many Mac applications keep their own document versions accessible from the file menu, browsing them side by side. The revert route works even without a backup drive attached, for programs that support it.
- Look at the program's own automatic recovery files.Word processors and spreadsheets keep automatic recovery copies while you work, in a location listed in their own options. These are for crashes rather than for overwrites, and occasionally they hold a version from before the damage. Look for them before closing the program, since some are cleared on a clean exit.
- Check whether a backup has a copy, and understand why this is different.A backup is the only route that survives everything else, because it holds separate copies rather than a history attached to the live file. A file damaged and then synced everywhere is exactly the case backups exist for. The catalogue's guides on setting up a proper backup and on whether cloud sync is a backup explain the distinction, which this situation makes concrete.
- Learn how long each route keeps things, for your own services.Retention differs between services and between free and paid tiers, and it changes. Rather than trusting a number from an article, look at the version list for one of your own files today and see how far back it goes. That is the real answer for your account, and it tells you how much time you have when this happens.
- Set yourself up so next time is easier.Keep working documents in a cloud-synced folder, which gives you version history for free. Turn on the operating system's file history or Time Machine. And use save-as with a new name at genuine milestones rather than relying on any of this — a folder with three dated versions is cruder than version history and it never fails.
Common mistakes
- Looking in the recycle bin for a file that was overwritten — The file was never deleted. It exists and its contents changed, so nothing is in the bin and file-recovery software is searching for the wrong thing.
- Continuing to work on the file while deciding what to do — Each save consumes part of your recovery window. Stop, take a copy of the current state elsewhere, then investigate.
- Assuming sync is a backup — Sync copies your mistake everywhere within seconds, which is why the damage arrives on every device. Version history is the feature that partly rescues this, and it is not the same as a backup.
- Never having looked at version history until you need it — The moment you need it is the worst moment to learn where it lives. Open it once on an unimportant file, today, and see how far back your own account goes.
If it doesn't work
There is no version history option on the file
Cause: It is not in a synced location, or the service does not offer it for that file type — Fix: Check whether the folder really syncs — look for the service's status icons on the file. If it is purely local, move to previous versions on Windows or Time Machine on a Mac.
Version history exists but not far enough back
Cause: Retention limits, or many saves since the damage — Fix: Check a backup next. This is the reason to stop saving the moment you notice: each save can push the good version out of a list that only holds so many.
A colleague overwrote a shared document
Cause: Someone else's edit, synced to everyone — Fix: Use the version history, which on collaborative documents names who made each change. Restoring does not delete their version — it makes an earlier one current and keeps theirs in the list.
The file is corrupted rather than overwritten
Cause: A crash or an interrupted save — Fix: Version history still works, because an earlier good version exists. Try that before any repair tool. The catalogue's guide on a file that says it is corrupted covers the case where no earlier version exists.
You saved over it and then emptied everything to tidy up
Cause: Bins and caches cleared — Fix: Version history at the cloud service is separate from the bin and is usually unaffected. Check there before assuming the worst — this is the situation where it earns its reputation.
Photographs edited and saved over
Cause: The editor wrote over the original — Fix: Phone photo apps generally keep the original and let you revert an edit at any time; desktop editors often do not. Check the photo app's revert option first, then cloud version history.
Files encrypted by ransomware and synced
Cause: The damage propagated through sync — Fix: Version history is one of the genuine defences here, because the service holds pre-encryption versions. The catalogue's ransomware guide sets out the order to work in, and it matters — cleaning the machine comes before restoring.
Questions people ask
How long do cloud services keep old versions?
It varies by service, by file type and by whether the account is free or paid, and it changes. Rather than relying on a figure, open the version list for one of your own files and see how far back it actually goes. That is the number that applies to you.
Does restoring an old version lose the current one?
No, on every major service. Restoring makes the older version current and keeps the newer one in the history, so it is reversible. That is what makes it safe to try before anything more drastic.
Does this work for photographs?
For phone photo libraries, yes — edits are generally kept separately from the original and can be reverted at any time. For photographs edited on a computer and saved over, it depends on the editor and on whether the file was in a synced folder.
Is there any way back if there is no version history and no backup?
Sometimes a temporary or automatic recovery file survives, and occasionally file-recovery software finds an earlier copy on a mechanical drive because the old contents were written to a new location. On an SSD this is far less likely, for the reasons the catalogue's guide on SSD recovery explains. Neither is something to rely on.
What is the difference between this and recovering an unsaved document?
An unsaved document never became a file, so recovery means finding the program's temporary working copy. An overwritten document is a real file whose contents changed, so recovery means finding an earlier version of it. Different problems, different tools, and the catalogue has a guide on each.