Deleting svg layer

Hello, is any way tho remove all the svg layers together?

Paste this in Macro Window and press Run:

for Layer in Font.selectedLayers:
	glyph = Layer.parent
	for i in range(len(glyph.layers))[::-1]:
		currentLayer = glyph.layers[i]
		if currentLayer.layerId != currentLayer.associatedFontMaster().id:
			if "svg" in currentLayer.name:
				del glyph.layers[i]

You can change the word “svg” for a different search string. Also there are scripts in my repo for deleting all non-master layers.

thanks!