Remove vertices not used in unstructured grid

I have a vtkUnstructuredGrid which has vertices not referenced by any cell. This happens because I have a big list of points which are used in several vtkUnstructedGrid. Each grid has cells that reference only a subset of the points.

Is there any filter to remove vertices and vertex data not referenced by any cell on the grid?

Yes ! Use CleanToGrid filter with “RemovePoitnsWithoutCells” property to on. This is only available in master or nightly though, not in any release yet.