So jquery api says the following:
Removing data from jQuery\'s internal .data() cache does not effect any HTML5 data- attributes in a document; use .
// Fetch an array of all the data
var data = $("a").data(),
i;
// Fetch all the key-names
var keys = $.map(data , function(value, key) { return key; });
// Loop through the keys, remove the attribute if the key contains "lorem".
for(i = 0; i < keys.length; i++) {
if (keys[i].indexOf('lorem') != -1) {
$("a").removeAttr("data-" + keys[i]);
}
}
Fiddle here: http://jsfiddle.net/Gpqh5/