perfect! thank you so much!
for anyone that's looking for the same thing here's the script with the unlocking and deleting:
processArtLayers(activeDocument);
///////////////////////////////////////////////////////////////////////////////
// Function: processsArtLayers
// Input: document or layer set
///////////////////////////////////////////////////////////////////////////////
function processArtLayers(obj) {
for( var i = obj.artLayers.length-1; 0 <= i; i--) {
try {
if(!obj.artLayers[i].visible)
{
obj.artLayers[i].allLocked = false;
obj.artLayers[i].remove();
}
}
catch (e) {}
}
for( var i = obj.layerSets.length-1; 0 <= i; i--) {
processArtLayers(obj.layerSets[i]);
}
}