If you have your iPhone sync notes with a Gmail account, you may notice that it doesn’t delete old versions of notes. Instead, every time you save a note, it creates a new instance in your email account. This can easily fill up your email address with a bunch of junk messages which are hard to get rid of. My solution is to use a Gmail plus address for syncing notes, and then periodically manually running a filter which deletes all of your old notes.
First, let’s go through what happens when you modify a note on your iPhone. For example, let's say that you are creating a note with the text "This is a sample message" and you press done after each word so that it saves the message 5 times. The first time you do this, you will end up with:
[Notes] part in all of these examples represents the
[Notes] label that is automatically applied or removed from these messages. Also, if you are trying to reproduce this experiment, make sure you give the service enough time to sync between each save.)
The second time, you will end up with:
The third time:
[Notes]This is a
- This is
The last time, you will end up with:
[Notes]This is a sample message
- This is a sample
- This is a
- This is
This becomes a nightmare if you want to get rid of all these old notes. It’s a difficult task since there are no labels, or other unique characteristics, applied to these messages which can be used to select them from among the thousands of messages you already have in your account. The only unique characteristics which could be filtered on are that the message’s from address (the same one set up on the iPhone), and the to address (it’s sent to no one). The best query I can come up with is:
from:me -to:(com | net | org | edu) -label:notes, but even this query will match other messages besides your old notes(e.g. a message sent to firstname.lastname@example.org will match incorrectly).
My recommendation is to use a Gmail plus address to set up note syncing with your iPhone. This gives you an accurate way to find messages that are created via the iPhone Notes application. It’s actually fairly simple to set up:
- On your iPhone, go into the mail settings and add a new email account.
- For the type, choose Other.
- Configure it as a normal IMAP account, except use a plus address for the Address field. For example, if your email address is
email@example.com, use something such as
user+iPhone.firstname.lastname@example.org. (This is only required in the address field. You can use your normal email address for the IMAP and SMTP User Name fields.)
- The last setting to change is at the end where it asks you what to sync (Mail and/or Notes). Since this is a dedicated email address just for notes, enable Notes and disable Mail. (Your phone should already be reading mail from this account via a separate iPhone mail account which uses Microsoft Exchange as the type.)
Okay, everything should now be set up properly on the iPhone, now you can go into Gmail (in your browser) and set up a filter:
- Go to Settings > Filters > Create new filter.
- In the From field, enter in the plus address you chose (e.g.
- In the Has the words field, enter in
- Press Next Step. You can safely ignore the message about the warning to not use
label:in a filter.
- Check the Delete it box.
- Press Create Filter.
Warning: Make sure you typed
–label:Notes correctly! If you made a typo, it will delete all of the notes you actually want to save. Thankfully, though, they are sent to the trash and aren’t permanently deleted, so you can recover them if you accidentally did that.
The purpose of creating the filter is not to have it delete the old messages automatically (there’s no way to do that in Gmail at the time). It’s simply to save the query and action needed to delete old messages. Whenever you want to delete old notes, you can go to this filter, edit it, then check the box that says Also apply filter to N conversations below and save it again.
While this solution it’s not automatic, it sure beats having to manually sift through the mail to delete the old notes.
If you have been using Notes the old way and have accumulated a lot of old notes, you will need to use the first query from above, and then manually check it to make sure only old notes are deleted. Once you set up the plus address, any time you save your old notes, they will get a new From address, so you will no longer have to deal with manual deletion.