How to remove elements from listview JQUERY mobile
Try emptying your list before appending list items first. Afterwards, make sure to call the refresh function of the listview widget, so jQuery Mobile will be rendering your list correctly.
$("#mypmenu").empty().append('<li><a href='+ "#" + ' id="a" "> <img src="letterheader.png" >'+ this.textContent + ' </a> </li>').listview("refresh");
See also http://forum.jquery.com/topic/dynamically-generated-listview