So right now i'm using marquee selection tool to select my need part, then reverse it and manually remove all the unwanted content that in reversed selected on severial layers, one by one.
By @ViXiMiXiV
a) create a selection in the document b) select the required layers on the layers palette c) run the script
@JJMack tried to explain, that layers may be different and the approach to removing content in them can be different, however, you said that we are talking about "normal layers" (I do not know what this means, but I assumed that these are pixel layers).
The script removes the content of only pixel layers. I added a check for the type of layer to the code so that you can safely select groups and layers of other types - it will simply ignore them.
var s2t = stringIDToTypeID;
(r = new ActionReference).putProperty(s2t('property'), p = s2t('targetLayersIDs'));
r.putEnumerated(s2t('document'), s2t('ordinal'), s2t('targetEnum'));
var lrs = executeActionGet(r).getList(p),
sel = new ActionReference();
for (var i = 0; i < lrs.count; i++) {
sel.putIdentifier(s2t('layer'), s = lrs.getReference(i).getIdentifier(s2t('layerID')));
(r = new ActionReference).putProperty(s2t('property'), p = s2t('layerKind'));
r.putIdentifier(s2t('layer'), s);
if (executeActionGet(r).getInteger(p) == 1) {
(r = new ActionReference).putIdentifier(s2t('layer'), s);
(d = new ActionDescriptor()).putReference(s2t("target"), r);
executeAction(s2t('select'), d, DialogModes.NO);
executeAction(s2t('delete'), undefined, DialogModes.NO);
}
}
(d = new ActionDescriptor()).putReference(s2t("target"), sel);
executeAction(s2t('select'), d, DialogModes.NO);