Action Replay writes directly to save/ROM; there's no "undo." Recovery options:
Prevention: Always back up saves (SD card, PC) before using cheat devices. Use cheats on copies, not primary files.