Skip to Content

iOS 17: How to Auto-Delete Verification Codes in Messages and Mail

by

Apple in iOS 17 introduced a new feature for Mail and Messages that can automatically delete one-time verification codes after you have used them. Here's how it works on iPhone and iPad.

ios 17 mail verification codes autofill
These days, many websites and services use one-time passcodes sent via SMS or over email for verification purposes, but these one-time codes can soon clog up your Mail inbox and Messages app.

Thankfully in ‌iOS 17‌, there's a new option to have those messages auto-delete after the code is autofilled and used to authenticate a login. Apple should ask you if you want to enable this when you use the autofill feature after upgrading to ‌iOS 17‌, but you can toggle it on manually by following these steps.

  1. Open Settings on your iPhone or ‌iPad‌.
  2. Scroll down and tap Passwords (you'll be prompted to use Face ID to authenticate the next screen).
  3. Tap Password Options.
  4. Under "Verification Codes," toggle on the switch next to Clean Up Automatically so that it is in the green ON position.

settings

That's all you need to do. Next time autofill uses a received verification code, the associated SMS message or email with be automatically deleted, helping you keep your inboxes clear of unnecessary cruft.

For more information on everything new in iOS 17, be sure to check out our ultimate guide.

Popular Stories

Apple Event Logo

Apple Released Seven New Products Today

Wednesday March 11, 2026 7:05 am PDT by
Starting today, the seven new Apple products that were announced last week are available at Apple Stores and beginning to arrive to customers. The colorful MacBook Neo and all of the other new products are on display at most Apple Store locations around the world starting today. Apple Stores have inventory of the new products for both walk-in customers and Apple Store pickup, but...
ios 26 4 yellow

Everything New in iOS 26.4 Beta 4

Monday March 9, 2026 3:50 pm PDT by
Apple is continuing to test the iOS 26.4 beta, and the latest update is now available for developers and public beta testers. As testing goes on, there are fewer new features in each beta, but today’s release adds new emoji characters and a few other changes. New Emoji Apple added new emoji characters, including trombone, treasure chest, distorted face, hairy creature, fight cloud, orca,...
Apple MacBook Pro M4 hero

Apple Planning 'MacBook Ultra' With Touchscreen and Higher Price

Sunday March 8, 2026 8:05 am PDT by
Apple is planning to launch an all-new "MacBook Ultra" model this year, featuring an OLED display, touchscreen, and a higher price point, Bloomberg's Mark Gurman reports. Gurman revealed the information in his latest "Power On" newsletter. While Apple has been widely expected to launch new M6-series MacBook Pro models with OLED displays, touchscreen functionality, and a new, thinner design...