This function and call might help you remove all layers of type 'TEXT'; (I've not tested it so be careful).

    removeLayers( ArtLayer.TEXT, app.activeDocument );

    /**
     * @param {LayerKind} layerKind  The kind/type of layer to filter
     * @param {Document}  psDocument The Photoshop document
     */
    function removeLayers( layerKind, psDocument ) {
        for ( var layer in psDocument.artLayers ) {
            if ( layer.kind === layerKind ) {
                layer.remove();
            }
        }
    }