Skip to main content
Jarek
August 25, 2023
Solved

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

  • August 25, 2023
  • 102 replies
  • 14113 views

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

Best answer by djv

Hey All, sorry for the continued trouble and frustration!

If the Detach deleted variables quick command does not work, the remaining ghost variables you’re seeing are still present because they’re still actively being used from collections within your design components and/or deleted color styles.

Be sure to review your file for variables that are being used across multiple pages. We understand how this can be confusing, especially when you have multiple collections with similar names and modes, making it difficult to differentiate between them.

Unfortunately, the team confirmed that we don’t have an automatic solution to fix this or a simple way to view which variables come from what collections. But in order to completely remove ghost variables, you’ll need to manually remove all instances of those variables from your file.

If you need help locating old variables that are still being referenced in nodes on the canvas and are able to share your file with us, please do so here: https://help.figma.com/hc/en-us/requests/new

Be sure to use your Figma account email, include a link to the file, share edit access with support-share@figma.com, and our Technical Quality team can help you locate and remove the old variables.

102 replies

March 6, 2024

How do I access this quick comand?

Jeroen_van_der_Ent
New Member
March 17, 2024

@ksn An update would be very nice. I am setting up multiple design systems for multiple applications but I am considering not using variables at all at this point because of this issue. A pity because it is so powerful.

I did some testing but this will make a big mess and slow things down.

Andrea_R
New Participant
March 18, 2024


Used every plugin to find items where old variables might be applied and used every quick command suggested, still having ghost variables in the file. It’s extremely frustrating.

djv
Figmate
Community Support
March 18, 2024

Hey @William_Goff,

You can access Quick Commands using:

  • Mac: ⌘ Command / or ⌘ Command P.
  • Windows: Control + / or Control + P.
Stephan_Loewe
New Participant
March 19, 2024

Still not fixed. Don’t know, if I should start again a file for a client, with work that already took 4 weeks.

Polly4
New Member
March 21, 2024

I detached the deleted variables from every layer of my file and the collection still appears in the Local variables menu under “Used variables”

Sumit_chakraborty
March 25, 2024

Still not fixed, when can we expect a fix?

Konrad_Lottenbach
March 25, 2024

Same issue here, still no fix.

Laurence_Carver
March 28, 2024

This has been going on for so long. I usually think that the Figma support is spot on here but there are too many responses here that feel automated asking us to submit another bug report for the same thing that it seems many people are struggling with.

Figma team, we all work on things with bugs and we’ve probably all experienced hard-to-fix bugs. Can you please let us know if you think a bug fix may be coming soon or not? Either way is good. I can’t keep telling my team that there’s a bug and we don’t have a solution. It’s a massive pain point for our Design <> Dev relationship.

March 28, 2024

when this happens to us, we go layer by layer to check where the old one is… it takes us so much time! and it can be in a hidden layer so imagine… but once you find the culprit and you delete it, they disappear