🚨 Variables: Deleted collections and modes don't disappear

Hi guys! :wave:

I have happy news for you. :smiling_face_with_three_hearts: Friends, I found how to solve the problem.

First, we use the “Select Layers” plug-in and the “Detach Variables” plug-in to delete the variables that do not exist in our file. With this plug-in, we use the “detach variable” plug-in by automatically selecting the instance layers, components and frames. (When using this plug-in, you must apply it to all pages in the file.)

Then, we follow the same path and this time we do “detach deleted variables” with Figma spotlight. (again by selecting layers on all pages)

and bingo!

All variable relationships in your file will be removed. Then, using the “Apply variables” plugin, we match the detached components in our file with our new variable collection.

I think I am quite an expert on the subject and I can help those who cannot do it in their processes.