Delete missing modules from canvas / file

I think you probably are referring to “placeholder” objects.

See this Delete PlaceHolder Component
There is comment from David about the situation and a useful script from Seghier.