Tidy Up Messages by Auto-Deleting Verification Codes on iPhone, Mac, iPad

Many services use two-factor authentication nowadays, where your phone or email address gets sent a code that you must enter as part of the login process into an online service. These codes are one time use only and therefore don’t make a lot of sense to keep around forever, but manually going through and deleting all those verification codes from Messages and Mail can be annoying.
Fortunately Apple has realized the endlessly piling up verification codes clutter is a hassle, and has created a handy optional feature that allows the operating system to automatically go through and delete those verification codes from your iPhone, Mac, or iPad, after they have been successfully used. This optional setting is particularly great when used in combination with the automatic security code fill feature available to macOS, iOS, and iPadOS too.
Here’s how to turn this handy feature on for your iPhone, iPad, and Mac:
How to Auto-Delete Two-Factor Verification Codes on iPhone & iPad
- Open the “Settings” app
- Go to “General” and then go to “AutoFill and Passwords”
- Scroll down to location the switch for “Delete After Use” and toggle that ON
How to Enable Auto-Delete Verification Codes on Mac
- From the Apple menu go to “System Settings”
- Go to “General” and then choose “AutoFill and Passwords”
- Under the “Verification Codes” section, toggle the setting for “Delete After Use”
With this feature enabled on the Mac, iPhone, or iPad, your verification codes will now automatically be deleted after they have been used. Again, pair this with the super handy autofill security verification codes feature and you’ll be logging into sites effortlessly while keeping your Messages or Mail app nice and clutter free.
Two-factor authentication can be a bit of a hassle but because of the massive security improvement that comes with using it, it’s well worth adopting. Often you don’t have any say in the matter anyway, as many services and sites require two factor authentication whether you want to use it or not, it’s just the necessary security measures required to be secure in the modern online services world.
Do you use this feature to automatically delete your one-time-use verification codes from Messages and Mail on Mac, iPhone, and iPad? Do you prefer to keep the messages and emails around for the verification codes for record keeping or some other purpose? Do you prefer to manually delete them? Share your thoughts and experiences in the comments.


Works on my iPhone unfortunately not on my iMac (running Big Sur).
Loved this addition to the OS. So much less clutter.
Good read — the key takeaways were especially helpful.
Auto deleting one time pass codes does not work on my iPhone 12 even as it is set up correctly.
I have the latest version of iOS 26 installed on my iPhone and it is toggled on, but it doesn’t work.
This was a pleasant surprise — high-quality content and useful tips.
if this feature is on on a Mac but Messages sync is off (not using iCloud Messages), will SMS codes received via iPhone still trigger auto-clean on the Mac? Or do both devices have to be synced for the script to run? I want to enable it on my work laptop but am worried about cleaning up on my personal iPhone.
I just turned on “Delete After Use” on my iPhone 15, and the WhatsApp OTP disappears 2 seconds after autofill perfectly clear. But when I log in to e-banking and need a screenshot of the code to send to customer service, it’s already gone. Is there a way to pause it temporarily other than disabling it completely? I think I need a “keep this one” button in the notification.