Your iPhone stores all of your text message history until you delete it. Text messages are stored as conversations in your history, with the most recent at the bottom. If you want to free up some memory, delete an entire conversation associated with a phone number that is no longer relevant, or simply delete references to a phone number within a message, you can do so via the edit function in your text messaging app.
Deleting all messages from a specific phone number
Open your "Messages" folder. Depending on which version of the iPhone operating system you have, this will either be located on the home screen or inside a folder named "Productivity," located on the home screen.
Swipe down until the relevant conversation appears on the screen. If you’ve saved the number to your “Contacts” folder, the name of the person, rather than their number will appear. If the number is not in your “Contacts” folder, the number will appear. A preview of the most recent message in each conversation is displayed. If you tap on the conversation, it takes you into the message conversation history, but you don’t need to do this to delete all messages.
Tap the “Edit” button in the top left of the message interface. This brings up a circular red and white icon, similar to a No Entry sign, next to each text message conversation.
Tap the icon next to the conversation you wish to delete. This brings up a red “Delete” button on the right of the most recent message next to the conversation preview.
Tap the “Delete” button. This automatically deletes the entire message history from that number. However, if you receive a new message from that number, it will remain in your text message history until you delete it.
Deleting a specific number in your message history
Open your message folder and scroll to the relevant message preview.
Tap on the message preview to open it. Scroll down to the message containing the number you wish to delete. For example, if your friend texted you a temporary number on which to contact him, you wish to delete it to avoid further confusion.
Tap “Edit” at the top right. This brings up a faded circle next to each message. Tap the circle next to the message you want to remove, then hit the “Delete” button that appears at the bottom left. If you select the wrong message, tap “Cancel.” You can delete multiple messages by tapping multiple faded circle icons before selecting “Delete.”