Skip to main content
Solved

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


Jarek

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 dvaliao

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.

View original

89 replies

Ryan_52
Figmate
  • Technical Quality Specialist
  • 382 replies
  • August 26, 2023

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.


Pavel_Kiselev

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.


Jarek
  • Author
  • 3 replies
  • August 26, 2023

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.


Jarek
  • Author
  • 3 replies
  • August 26, 2023

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?


DeniCarUX
  • 1 reply
  • September 11, 2023

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


dvaliao
Figmate
  • Community Support
  • 4654 replies
  • September 25, 2023

Hey All,

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

If this doesn’t work, it’s likely that old variables are still being referenced in some nodes on the canvas. If you’re able to share your file with us, our Technical Quality team can help you locate them: https://help.figma.com/hc/en-us/requests/new

Please be sure to use your Figma account email, include a link to the file, and share edit access with support-share@figma.com.


Jarek
  • Author
  • 3 replies
  • September 26, 2023

Thank you! I forgot about quick commands and was not aware that this command even exist 🙂


zu.nguyen
  • New Participant
  • 17 replies
  • October 15, 2023

This seems doesn’t work for me. I copy radix color scales to my UI kit and even run the command to delete old variables it still there.


dvaliao
Figmate
  • Community Support
  • 4654 replies
  • October 16, 2023

Sorry to hear that, @zu.nguyen! Our designer advocate, Miggi, shared this walk through last week:

twitter.com

If anyone is continuing to have issues, please submit a bug report to the team here.


dvaliao
Figmate
  • Community Support
  • 4654 replies
  • October 27, 2023

A post was split to a new topic: Quick option to “Detach all variables”


dvaliao
Figmate
  • Community Support
  • 4654 replies
  • October 27, 2023

Thanks for your feedback, @Dustin_Miller1!

We’re moving your idea to its own topic as a feature request, and we’ll pass this onto our Variables team for future consideration!


Hello! I’m having serious issues with not being able to get rid of old/ghost variables (variable modes that have been deleted). Figma has been extremely silent about this but it seems to be a massive issue.

We have tried everything previously suggested on forums but these variables modes that are now deleted will not disappear.

Please can someone provide some clarity or help with this?! Driving me mad!


ksn
Figmate
  • Community Support
  • 1615 replies
  • November 22, 2023

Hey @Issy_Raine! We‌ reported this as an issue with our engineering team a short while back.

We asked for an update, and they’re working to get a fix/update out that applies to this issue. I don’t have an exact date at the moment, but can confidently say this is being addressed internally (and actively).

Sorry I don’t have an alternative solution or workaround at the moment, but I wanted to make sure you were acknowledged with an update.


Oliver_Schwaiger

Any progress here @ksn ? I am also having troubles with this.
How would I be able to identify where the ghost variable is applied?
Leads to sleepless night already 😅


I have the same problem!

I worked many hours on my file to get something clean and now, just by copying a few components from an old one, my world has collapsed lol. Thanks to the dev team for the future update, right now I’m in extreme frustration mode.

If there was just the possibility, with an “-” icon, to delete the ghost variables and have them recover their initial property, that would be awesome.

Thanks in advance 😉


We had a call with a Figma engineer. There is no way to get rid of the ghost variables other than getting Figma support to manually remove them for you apparently?! They also admitted that there’s a lot of bugs. IDK about you guys but we’re really struggling with modes and variables…


ksn
Figmate
  • Community Support
  • 1615 replies
  • December 7, 2023

Hey all! I know there’s an update that should address this, but I don’t know when exactly it’s going to roll out. If I get an update from engineering, I’ll add it here.


Ok! Thx @ksn


annetanguy

Hi, any new on that? I still have “used variables” despite having deleted “ghosts” variables.


Mink
  • New Member
  • 2 replies
  • January 22, 2024

quick commands not work for me
I duplicate the problem file and remove all page and everything but it still there


Julien_vlabs

I have a similar problem, I removed all external variables links in my file but still have these external collections as “Used variable” in the mode dropdown menu… Quick command does not find anything


Ali_Tohme2

Still have the same issue, used variables are ghosts !!!


sedatcakir
  • New Member
  • 9 replies
  • January 31, 2024

I have that same problem. It is not resolved in any way. annoying.


Laura_Silvani2

Same issue here. Tried the quick command but it does not work. I even see duplicated modes, with same values, in my file.


Is there any chance for Figma to fix this? It’s a horror show trying to manage massive Design Systems. I already have to leverage Token Studio Plugin to manage and create my variables and themes. Would really like to see some updates to this. Also the YouTube tutorial is useful, but I’ve had literally empty files, that I’ve stripped clean with all kinds of plugins and the (Used variables) persist.

I’ve been practicing extreme file heigein to prevent contamination between old files and new yet it still happens. And now I can’t even use the version controls. I’ve gone back to file conception with the version control and the used variables are now persistent moving back.

I made a backup of my library the other day and imported it to my files and there was no issue. It only contained variables found in that file. Now if I import that same backup it also has the used variables. So not sure if this has something to do with published variables. Not sure because I’ve already unpublished my variables before importing the old save.


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings