Clear iMessage chat history on Mac

If you have been wondering on how to clear the chat history on iMessage like me, Here is a quick command that you can execute in the Terminal to clear the history.

rm -r ~/Library/Messages/chat.*

What the command does is basically delete all the files that are named chat in your messages folder in your library. The command should work in OS X Maverics. If it worked for you in anyother OS X version do let me know in the comments.