I don't understand this error message

So I have this one component that initially came from another library and still remains after I have removed / deleted this library from my project / Figma.

When I drag and drop it I get this error message:
“You can’t add an instance of a shared component into the document from which the shared component was published if the original component was deleted.”

Does anyone know what it means?

Hey @Steven3,

It means you cannot create any new instances of this component, since it came from a now deleted library.

it makes sense that you can’t do it, it just doesn’t make sense to me that it’s appearing in my search results. Is there a way to ‘clear the cache’ or otherwise get those results out of there? We have so many of them and it is making the assets panel unusable for us.
Thank you.

Thank you for clarifying!

To give some more context, when a main component is deleted, any connected instances are not detached. This is a safety measure in case a main component is deleted or removed accidentally, so that you have the option to restore it. This also means that any existing instances from this component in this file will surface the same component in the asset panel.

To find Component instances ‘Used in this file’ or from a Missing Library:

For each page in the file:

  1. Drag in an Instance from the ‘Used in this file’ section of the Assets panel.
    If this generates an error this usually indicates that the original Component has been deleted — the user will need to manually locate the instance by checking all Instances with similar appearance or recover the deleted Library file or deleted main component to use this flow.
  2. Select the instance you just added and use the 'Quick Action menu (Command on Mac or Control on Windows) to ‘Select all with same Instance’.
  3. If you find any Instances which are selected, then detach or swap them with the correct library instance.

Once the Instances are removed from the file, this will remove them from the ‘Used in this File’ list.