How to delete all LinkedIn messages at once

Too bad LinkedIn still does not offer us to select multiple conversations to archive them at once.

If you have a lot of conversations that you want to delete without hand work use the following script in Chrome console log.

The steps to delete all LinkedIn conversations/messages

  • Go to the LinkedIn site and open Messages
  • Scroll down your list of conversations until the last conversation appears
  • Scroll up and select the first conversation on top of the list
  • Press F12 and in the Console tab paste the following code and press enter:
;(function () {
  setInterval(() => {
    let deleted = false;
    $('artdeco-dropdown-item').each((i, elem) => {
      let txt = $(elem).text().trim();
      if (txt === 'Delete') {
        deleted = true;
        $(elem).click();
      }
    });
    if (deleted){
      setTimeout(() => $('.msg-modal-delete-convo').find('.artdeco-button--primary').click(), 500)
    } else {
      $('.msg-conversation-card__list-action-icon').eq(1).click();
    }
  }, 350);
}());