To undo in Anki desktop, press Ctrl+Z (Cmd+Z on a Mac) or choose Edit > Undo. The menu names the step it will undo, for example Undo Answer Card or Undo Delete Deck. Anki keeps up to 30 steps. On iPhone and iPad, shake the device to undo the last answer. In AnkiDroid, tap the Undo button on the study screen. If Undo does not offer the step that you want, restore an automatic backup.
Publisher disclosure: Smort publishes this guide. Every step uses Anki’s own tools. Our app appears in one section near the end.
Undo a wrong answer
Undo brings back a card that you answered by mistake, and you answer it again.
- Anki desktop
- Press Ctrl+Z on Windows and Linux, or Cmd+Z on a Mac. Or choose Edit > Undo Answer Card. Press it again to undo the answer before that one.
- AnkiMobile on iPhone and iPad
- Shake the device. By default, a shake undoes the previous answer, and you can change this under Shake Action in the preferences. Undo is also a study action: open the tools screen with the gear icon on the study screen, or put Undo on a tap or a swipe in the preferences.
- AnkiDroid on Android
- Tap the Undo button at the top of the study screen. The AnkiDroid manual says this button always shows. With a keyboard, press z. After the last card of a session, Undo is in the ⋮ menu of the deck list.
Sources: Anki 26.09.3 main window menusAnkiMobile manual: Study toolsAnkiMobile manual: PreferencesAnkiDroid manual
Undo a deleted deck, a deleted card or an import
In Anki desktop, most changes go on the same undo list as answers. Undo them at once, before other steps push them back.
- Open the Edit menu. In the main window, it names the last step, for example Undo Delete Deck, Undo Delete Note or Undo Import. The Browse window has its own Edit > Undo.
- Choose Undo until the step that you want is back. Each Undo goes back one step, up to 30.
- To put a step back, choose Edit > Redo, or press Ctrl+Shift+Z.
An imported .colpkg file has no undo. Neither has an old collection.apkg backup. Both replace your whole collection. Anki makes a backup before that import, so restore it.
In AnkiDroid, a deleted deck shows a message with an Undo button. Undo is also in the ⋮ menu of the deck list.
Sources: Anki 26.09.3 undoable actionsAnki 26.09.3 undo codeAnki manual: BrowsingAnki manual: BackupsAnkiDroid manual
Too late for Undo? Restore a backup
Each Anki app makes automatic backups of your cards and review history. Backups do not include sounds or images.
A restore loses every change made after the backup. Pick the latest backup from before the mistake.
- Anki desktop
- Choose File > Switch Profile, then click Open Backup, and pick a backup. Anki turns off automatic sync and backups after a restore. When the right cards are back, close Anki and open it again. Anki makes a backup every 30 minutes by default.
- AnkiMobile on iPhone and iPad
- Open the preferences, go to Backups, and tap the backup that you want to go back to.
- AnkiDroid on Android
- On the deck list, open the ⋮ menu and choose Restore from backup. AnkiDroid makes a backup when the app starts, if 5 hours have passed since the last one. It keeps the last 8 by default.
Sources: Anki manual: BackupsAnkiMobile manual: PreferencesAnkiDroid manual
Stop a sync from copying the mistake
A sync has no undo. If you deleted a deck on one device, the next normal sync deletes it everywhere. The Anki manual gives this fix.
- Get the deck back in Anki desktop, with Undo or a backup restore.
- Force a one-way sync. In Anki desktop, open Tools > Preferences (Anki > Preferences on a Mac) and check On next sync, force changes in one direction.
- Sync Anki desktop, and choose Upload. This sends the good copy to AnkiWeb.
- Sync each other device, and choose Download. Their unsynced changes are lost.
Source: Anki manual: Syncing
Get deleted notes back from deleted.txt
No backup from before the delete? Anki desktop writes each deleted note to a text file, deleted.txt, in your profile folder. Import it with File > Import. This brings back the text of the notes, but not their review history. In a profile made with Anki 25.09.2 or older, split the file by note type before the import.
Source: Anki manual: Backups
Smort, our iPhone app
Smort is an AI conversation partner and flashcard app for iPhone. Talk out loud in the language you’re learning, and answer each card aloud or by text instead of flipping it. Smort imports the text cards in an Anki .apkg. Images, audio, and some custom card templates don’t import. Your Anki collection stays as it is. Smort is on the App Store for iPhone with iOS 26.4 or later.
Common questions
- How do I undo my last answer in Anki?
- In Anki desktop, press Ctrl+Z (Cmd+Z on a Mac), or choose Edit > Undo Answer Card. The card comes back, and you can answer it again. On iPhone, shake the device or use the Undo study action. In AnkiDroid, tap the Undo button on the study screen.
- Can I undo a deleted deck?
- Yes, if you act at once. In Anki desktop, choose Edit > Undo Delete Deck. In AnkiDroid, tap Undo in the message that shows after the delete. If Undo no longer offers it, restore a backup from before the delete.
- Can I undo an import?
- In Anki desktop, Edit > Undo Import reverses a deck package (.apkg) or text import, if it is still the last step. A .colpkg file, and an old collection.apkg backup, replace the whole collection instead. Restore the backup that Anki made before that import.
- How many steps can Anki undo?
- Anki desktop keeps up to 30 undo steps. Choose Edit > Undo again to go back one more step. Edit > Redo (Ctrl+Shift+Z) puts back a step that you undid.
- Can I undo a sync?
- No. A sync has no undo. To get back a deck that a sync removed, restore a backup on one device, then force a one-way sync and upload that copy. Then download it on your other devices.
- Where do I find deleted cards?
- Anki desktop writes each deleted note to a file called deleted.txt in your profile folder. You can bring the notes back with File > Import, but their review history does not come back. A backup keeps the history.
Sources
How we checked: Each step comes from the Anki manual, the AnkiMobile manual, the AnkiDroid manual or the Anki 26.09.3 source code, checked on November 8, 2026. The manual gives no undo shortcut and no undo limit, so they come from the source.
Anki manual: BackupsAnki manual: SyncingAnki manual: BrowsingAnki 26.09.3 main window menusAnki 26.09.3 undo codeAnki 26.09.3 undoable actionsAnkiMobile manual: Study toolsAnkiMobile manual: PreferencesAnkiDroid manual