On iOS 17, your iPhone can automatically remove one-time verification codes from Messages and Mail after you use AutoFill. Turn on the setting once, then enter a code from the keyboard’s AutoFill suggestion; iOS deletes the message or email containing it after the code is used.
What You’ll Need
- An iPhone running iOS 17 or later. Menu wording can vary slightly in later iOS releases.
- A verification code delivered in Messages or Mail. The feature does not automatically clear codes from every authenticator app or other messaging service.
- The ability to enter the code using the AutoFill suggestion above the keyboard. Manually typing or copying a code may not trigger deletion.
Step-by-Step
- Open Settings. Find the gray Settings app on your Home Screen or in the App Library, then tap it.
- Open Password Options. Scroll down and tap Passwords. Authenticate with Face ID, Touch ID, or your passcode if prompted. Tap Password Options near the top of the screen. On some iOS 17 versions, you may need to scroll within the Passwords area to see it.
- Enable automatic cleanup. Under the section for verification codes, turn on Clean Up Automatically. The switch should appear green. This setting tells iOS to remove a code-bearing message or email after you use its code through AutoFill.
- Receive a verification code. Start a sign-in or verification process on a website or app that sends a code to Messages or Mail. Wait for the message or email to arrive. Make sure it is in the app where you expect it; iOS cannot clean up a code it cannot identify.
- Use the AutoFill suggestion. Return to the sign-in screen and tap the code suggestion displayed above the keyboard, or tap the suggested code when it appears in the relevant field. Check that the digits fill the intended verification field. This is the action that lets iOS recognize the code as used.
- Check the source app if needed. After the code has been used, open Messages or Mail and look for the original item. If the feature recognized and cleaned it up, the code-bearing message or email should no longer be there. Avoid deleting an entire conversation manually if you need to retain its other messages.
- Test with a fresh code. If you are unsure whether the option is working, request another code from a service you can safely access and use its AutoFill suggestion. Do not use an expired code or share a live code just to test the setting.
Common Mistakes
- Expecting every code to disappear immediately. The cleanup is tied to using a code through AutoFill. Turning on the switch alone does not necessarily remove old or unused codes.
- Typing the digits yourself. Manually entering a code may not count as using AutoFill. When available, tap the suggestion above the keyboard instead.
- Looking in the wrong app. This setting concerns codes received in Messages and Mail. It does not promise deletion from third-party email clients, chat apps, or authenticator apps.
- Assuming deletion applies to a whole conversation. The feature is intended to clean up the verification-code item, not erase every message in a conversation. If the item remains, inspect it before deleting anything yourself.
- Confusing cleanup with code expiration. A code may stop working after a limited time, but that does not mean its message has been removed. Expiration and cleanup are separate actions.
Tips
- Keep Clean Up Automatically enabled if you routinely receive short-lived sign-in codes and prefer not to retain them in your inbox.
- Use AutoFill rather than switching apps to copy and paste. Besides making cleanup more likely, it reduces the chance of a mistyped digit.
- If you need to keep a particular message or email, note that automatic cleanup may remove it after AutoFill. Save any non-sensitive information you need elsewhere before using the code, while treating verification codes as private.
- Consider whether you rely on old messages for records or account-support details. This feature is convenient, but it may be better to leave it off if you regularly need to retain code messages.
- Do not forward a verification code or give it to someone who asks for it. A legitimate sign-in process should have you enter it on the service you are trying to access.
Troubleshooting
The option is missing: Confirm that the iPhone is running iOS 17 or later by opening Settings > General > About and checking the iOS version. Then return to Settings > Passwords > Password Options. If the phone is on an earlier version, update iOS if an update is available and appropriate for your device.
The code appears, but the message stays: Verify that Clean Up Automatically is on. Then request a new code and tap the AutoFill suggestion rather than typing or pasting the digits. A code already used without AutoFill may not be cleaned up afterward; the setting is not a general inbox-cleaning tool.
No AutoFill suggestion appears: Check that the code arrived in Messages or Mail and that the correct verification field is active. Tap the field, make sure the keyboard is visible, and give the message a moment to arrive. If the service offers a resend option, request a fresh code and try again. You can enter it manually if necessary, but do not expect that to trigger automatic cleanup.
The code came through another app: The setting may not apply. Check that app’s own options for managing messages, or delete the item manually if you are sure you no longer need it. Avoid granting an unfamiliar app access to messages or passwords just to remove a code.
It still does not work: Close and reopen the affected app, restart the iPhone, and check the Password Options switch again. If the behavior persists on an up-to-date iOS version, consult Apple’s current iPhone user guidance or support; do not assume that every message format or mail provider is supported.
Frequently Asked Questions
Does iOS 17 automatically delete every verification code?
No. The cleanup feature is for recognized codes in Messages and Mail after you use the code with AutoFill. Other apps and manually entered codes may not be cleaned up.
Will it delete codes that are already in my inbox?
Do not count on it to clear old or unused items. It is designed to clean up a code-bearing message or email after you use its AutoFill suggestion.
Can I keep a code message after using AutoFill?
The setting is meant to remove the used code item automatically. Turn off Clean Up Automatically before using AutoFill if you prefer to retain code messages.
Does automatic cleanup delete the whole text conversation?
It is intended to remove the verification-code item, not the entire conversation. Check Messages after use, especially if the code arrived in a thread with other messages you want to keep.
Does it work with authenticator apps?
No. This setting concerns verification codes received through Messages and Mail, not codes generated inside authenticator apps.
Can I remove a code manually?
Yes. Delete the relevant message or email in its app if you no longer need it. Take care not to delete a whole conversation or unrelated mail by mistake.
Related
General steps for current mainstream versions; menus can differ by device and version. See the disclaimer or report an error.
More in this bed
- How to Schedule Work Profile Android Phones
- How to Enable ChatGPT Plugins and Use Them
- How to Print PowerPoint Slides With Notes
- Fix This App Was Blocked for Your Protection in Windows
- Windows Backup and Restore Stuck? What to Do
- How to Use Microsoft Copilot on Mobile