Smart Systems for Home

Plain how-to guides for smart home, security and home Wi-Fi

Auto Delete Verification Codes on iPhone, iPad & Mac

· 4 min read · Home Tech

In this article
  1. How Auto Delete Works
  2. How to Enable Auto Delete on iPhone and iPad
  3. How to Enable Auto Delete on Mac
  4. Why You Might Not See the Option
  5. What About Codes in Mail?
  6. Common Problems and Troubleshooting
  7. Frequently Asked Questions

Yes, iPhone, iPad, and Mac can automatically delete verification codes sent via Messages or Mail after you use them with AutoFill. This feature, introduced in iOS 17, iPadOS 17, and macOS Sonoma, removes the clutter of old one-time passcodes from your apps. Here’s exactly how it works and how to turn it on.

How Auto Delete Works

When you receive a verification code, Apple’s system detects it and offers it as an AutoFill suggestion above the keyboard or in the QuickType bar. Once you tap that suggestion, the system knows the code has been used. With the “Clean Up Automatically” setting enabled, it then deletes the message containing that code after a short delay.

This applies to codes sent through the built-in Messages app and the Mail app. Codes from third-party authenticator apps like Google Authenticator or Authy are not affected, because those apps manage their own codes and don’t use Apple’s AutoFill system.

How to Enable Auto Delete on iPhone and iPad

The setting is found in the Passwords section of Settings. On iOS 17 or later, follow these steps:

  1. Open Settings.
  2. Scroll down and tap Passwords.
  3. Authenticate with Face ID, Touch ID, or your passcode.
  4. Tap Password Options at the top.
  5. Toggle on Clean Up Automatically.

Once enabled, any verification code message you use with AutoFill will be automatically deleted. If you don’t see the option, make sure your device is updated to iOS 17 or later.

How to Enable Auto Delete on Mac

On a Mac running macOS Sonoma or later, the process is similar:

  1. Open System Settings.
  2. Click on Passwords in the sidebar.
  3. Enter your Mac’s password or use Touch ID.
  4. Click the info button (i) next to “Password Options” or look for the “Clean Up Automatically” toggle directly.
  5. Turn on Clean Up Automatically.

After this, verification codes received in Messages or Mail on your Mac will be removed after you use them with AutoFill. The setting syncs across your devices via iCloud Keychain, so enabling it on one device typically enables it on all.

Why You Might Not See the Option

If you’ve updated your device but can’t find “Clean Up Automatically,” check the following:

  • Software version: The feature requires iOS 17, iPadOS 17, or macOS Sonoma or later. Older versions don’t have it.
  • Region or language: In some regions or with certain language settings, the option may be labeled differently or temporarily unavailable.
  • Managed device: If your iPhone or Mac is managed by an organization (e.g., a work or school device), restrictions may hide the setting.

If you’ve confirmed all these, try restarting your device or signing out and back into iCloud Keychain. In most cases, the toggle appears after a fresh update.

What About Codes in Mail?

Auto Delete also works for verification codes that arrive in the Mail app. When you use a code from an email via AutoFill, the email is deleted. However, this only applies to codes that Apple’s system recognizes as one-time passcodes. If an email contains other important information along with the code, the entire email will be deleted, so be cautious. For emails that contain both a code and other content, you might want to keep the email and manually copy the code instead.

Common Problems and Troubleshooting

Codes aren’t being deleted after use. First, make sure “Clean Up Automatically” is actually toggled on. Then, check that you’re using the AutoFill suggestion rather than manually typing the code. If you type it yourself, the system won’t know it was used and won’t delete the message. Also, ensure the code came from Messages or Mail, not from a third-party app.

The setting is missing entirely. This is almost always due to an outdated OS. Go to Settings → General → Software Update (or System Settings → General → Software Update on Mac) and install any available updates. If you’re already on a supported version, try toggling iCloud Keychain off and on again.

Codes from a specific sender aren’t deleted. Some senders use custom formatting that Apple’s detection doesn’t recognize. In that case, the code won’t be offered as an AutoFill suggestion, so it won’t be deleted. You’ll have to delete those manually.

Frequently Asked Questions

Does auto-delete work with codes from apps like Google Authenticator?
No. Auto-delete only applies to codes received in Messages or Mail. Authenticator apps generate codes locally and don’t use Apple’s AutoFill system, so they are unaffected.

Will auto-delete remove the entire message or just the code?
It removes the entire message or email that contained the code. If the message contains other information (like a link or instructions), that will be lost too.

Can I recover a deleted verification code?
Once deleted, the message is gone from your device. If you have iCloud Messages enabled, it may still exist on other devices that haven’t synced yet, but it’s not guaranteed. If you need the code again, you’ll have to request a new one.

Does this work on older iOS versions?
No. The feature requires iOS 17, iPadOS 17, or macOS Sonoma. On older versions, you can manually delete verification code messages after using them.

Is there a way to delete all old verification codes at once?
Not directly. The auto-delete feature only removes codes after you use them. To clear old codes manually, you can search for “code” in Messages or Mail and delete the conversations individually.