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

Julien_vlabs
January 23, 2024

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
January 28, 2024

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

sedatcakir
Active Member
January 31, 2024

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

Laura_Silvani2
New Member
February 2, 2024

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

February 6, 2024

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.

zu.nguyen
Active Member
February 19, 2024

This still doesn’t work 😦

Martin_Mateos_Sanchez
February 20, 2024

Same issue here. I hope to see it fixed when variables are out of beta

y_toku
Figmate
Community Support
February 21, 2024

Thanks for bringing this to our attention.

Everything appears to be working fine on my end, but if you’re still experiencing issues, could you please submit a bug report following the steps outlined here: https://help.figma.com/hc/en-us/articles/360041468234-Submit-a-bug-report?

Thanks!
Toku

lisa_gil
February 21, 2024

Hey all, i managed to delete mine via the quick command “toggle variables”:


This let me delete all the mistakenly added variables 🙂 hope this helps!

Eugene_Ross1
February 24, 2024

@ksn Any word on an update for this fix?