How to clear “Used variables” that don’t exist in the file anymore?

Hi folks!

I used some components from other files in my project, and even though I removed them, I still see some Variables available in the “Page → Modes”. They are not available anywhere else. It doesn’t affect the project; when I select one, change the page, and then return to it, that mode is selected.

I checked my file, and nothing leads to the other file anymore – no styles, variables, components, etc.

It seems like a bug, and I see some variables pulled from another file, but can I remove it somehow?

image

Hey, sorry to hear this is happening! Please reach out to the support team directly via this form for help: https://help.figma.com/hc/en-us/requests/new

Be sure to use your Figma account email, include the links to your file, and share it with support-share@figma.com so they can take a closer look.

1 Like

That’s the thing with variables. Once assigned they stay there forever unless you break the link manually. Right the only way it to find rogue layers and remove bound var by hand, very frustrating.

The problem is that there is no link between the “ghost” variables in my layers and pages.
Also, I don’t like that when you apply a mode to a page or a layer, there is no option to remove it - but here, I guess it’s the same as setting it to the “default” mode.

1 Like

Weird, but it’s gone now. I didn’t change anything, and when I returned to my computer today, I saw it’s not there anymore. So maybe the file needed to refresh, and it just took longer than it should?

I have the same issue. These variables are not used anywhere anymore, but they’re still there just like ghosts. Has anyone solved?

Hey All,

You can use the quick command: Detach deleted variables to quickly get rid of any existing ghost variables.

1 Like