Skip to main content
Jarek
Aug 25, 2023 5:06 PM UTC
Solved

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

djv
djvSolution
Community Support
Oct 8, 2024 3:47 PM UTC

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.

103 replies

Mar 6, 2024 1:11 PM UTC

How do I access this quick comand?

Jeroen_van_der_Ent
New Member
Mar 17, 2024 10:17 AM UTC

@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
Mar 18, 2024 10:14 AM UTC


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
Mar 18, 2024 4:54 PM UTC

Hey @William_Goff,

You can access Quick Commands using:

  • Mac: ⌘ Command / or ⌘ Command P.
  • Windows: Control + / or Control + P.
Stephan_Loewe
New Participant
Mar 19, 2024 3:05 PM UTC

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
Mar 21, 2024 6:35 AM UTC

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
Mar 25, 2024 4:10 AM UTC

Still not fixed, when can we expect a fix?

Konrad_Lottenbach
Mar 25, 2024 12:46 PM UTC

Same issue here, still no fix.

Laurence_Carver
Mar 28, 2024 9:39 AM UTC

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.

Mar 28, 2024 10:07 AM UTC

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