When you have more than a single message between you and your contact then those messages become a conversation thread. You would not be able to delete an individual message within a thread, but you can delete the entire conversation history. Note that when you delete a conversation once it cannot be restored.
Delete a conversation in LinkedIn:
Open LinkedIn on your desktop.
Find the Messaging icon at the top of the homepage and click on it.
On the left side you will find the list of messages. Select the message that you want deleted from the list.
Find the Menu icon in the top right corner of the conversation thread. Then select Delete conversation.
You would be asked to confirm your decision. Then click on Delete.