Skip to main content

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

doesnt work for me either,


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.


Same problem! Please find a solution to easily remove them completely!


i found solution with dead instances of used variables. First of all Figma didn’t respect hidden layers for “detaching deleted variables” as “reset variable modes in selection”, Figma also dont show hidden layer color in selected colors panel since hidden layers not selected.


Also this dead or old hidden layers across components forse Figma to show old/dead modes.


So to get rid of dead modes you need



  1. Select all in page

  2. Reset variable modes in selection.

  3. Detach deleted variables.

    wait till Figma did a thing and after that wait for Figma did all background updates.

  4. Check if “Dead mode” was removed (in my case it removed in 90% cases).

  5. if “Dead mode” still exist > look for hidden layers and remove them or reconnect to correct variable.


i get rid of Dead mode for about 30 min with this steps.

Enjoy


My ghost variables came down a button where I had deleted the master component, but had a modified version in my library. When I restored the component master, removed ghost variables, it all cleaned up for me.


But a more robust way of finding ghost variables would be appreciated.


I deleted every page, but there are still two ‘Used variables’ collections in this file. It’s really frustrating.


The same issue here it is still in UI3. I tried the quick command but it does not work.

I am still facing this Ghost variable issue Does anyone know how to remove them? Will appreciate thanks


image


yeah it is kind of ridiculous that after 2y this bug still exists … some heavy flaws in the modelling here …


Please, Figma, Fix this issue. I want to copy components from a file to another and it’s impossible to make it without importing a full set of ghost variables. I’ve tried to use a “bridge new document” where I remove manually all the variables, and then, copy and paste the components in the Figma file I need… and variables are still in there. No makes sense at all.


I’m trying to be creative: I created a history version point. Then import the components, remove manually the variables of every single layer. Once all the layers have any link with any variable, copy all the components again. After that, I restored the history version I created previously and paste the cleaned components… And it seems to work but some layers are removed and don’t appear. It’s clear that you have a real bug with this.


Hey, just to add to the pain point here: bringing in components from files with the same variable architecture will NOT allow the file-specific variables to overwrite the previous mode(s). Won’t see the local variables, on any level. First test was to try to apply mode in mass; the local modes were literally not available in the dropdown. Go to the most granular level and build up by applying the specific, new-file, updated-design variable, which then show up and LOOK right, will not reset what modes are listed as available or note the local variables are attached in Figma. Using Tokens Studio, and that add-on CAN see and CAN change and what’s developed out of it WILL work. It’s just Figma.


It impacts as I build, as others come in to use the libraries I’m building, as devs try to develop from the libraries I’m building, and as we try to ensure that tokens will be applied in production in a way to absorb design chances fluidly. It’s not a little thing. It really needs attention.


Hi, as a Figma user I would like to easily detach all components, styles, and variables on selected frame (hidden layers included), so that I can hand over my design from one project to another without the risk to mess up a different design system.


Thanks! 🙏


as a Figma user I would like to easily detach all components, styles, and variables on selected frame (hidden layers included), so that I can hand over my design from one project to another without the risk to mess up a different design system.

 

Agreed, this is a must-have. Right now moving components from one design system to another is extremely messy and hard to clean up when using variables and styles across my component libraries.


I am also experiencing this issue in a design system library file – I spent over 2hrs of attempting to manually go through each page of the file and relink variables correctly, find hidden layers referencing other file variables and have barely made a dent in the issue. There really needs to be a way to “remove all variables not created in this file from all visible and hidden layers” option.

Better yet, being able to detect the variables that are being referenced and a way to map them to variables created in that file. 


Although there seems to be a range of issues people are experiencing in this thread, some of them may be resolved with the aid of a new plugin I built that can help identify stray variables or components that are still attached to a node somewhere in your file. You may have to run the plugin one page at a time for bigger files for now (it can timeout on whole file scans if the project file is large). Hoping this helps some others like it did for me. 

Stray Component & Variable Finder


Although there seems to be a range of issues people are experiencing in this thread, some of them may be resolved with the aid of a new plugin I built that can help identify stray variables or components that are still attached to a node somewhere in your file. You may have to run the plugin one page at a time for bigger files for now (it can timeout on whole file scans if the project file is large). Hoping this helps some others like it did for me. 

Stray Component & Variable Finder

Finally, you solved it! Thank you!


 

It’s not working for me. I have many text variables that I need to detach, but with the plugin scan I was only able to find components and not variables. The variables were brought in from the file called Website Refresh when I copied over some elements. What am I doing wrong?

 


 

It’s not working for me. I have many text variables that I need to detach, but with the plugin scan I was only able to find components and not variables. The variables were brought in from the file called Website Refresh when I copied over some elements. What am I doing wrong?

 

If by ‘only able to find components’ you are talking about your second screenshot - The index library tab is used solely to ‘whitelist’ or ignore components and variables you don’t want to be identified as stray. So if the file that you are in right now ‘saltbox pitch deck’ does not have any variables created in it then it won’t show any on the index tab. If you are using the plugin to scan for variables in the ‘pitch deck’ file and it isn’t coming up with any results even though you know there are variables in it, then that would be an issue i’d have to look into.
Hope this help; if you are still having issues then maybe you can duplicate the target file, delete most of the content so there is only a small sampling of the text you are scanning that is not being recognized and share it and i can try and identify what is going wrong.


Finally removed ghost variables (manually check) – hope this helps!

 

Hi! Just want to share my experience dealing with ghost variables in Figma — those deleted variables that still show up in the mode dropdown even though they’re no longer in the file.

I ran into this while cleaning up my file. I deleted and recreated some variables, but found that old/ghost variables still existed in the dropdown. 

 

At first, I went page by page to check if any layer was still using the old variable. But that didn't remove the ghost variable collection. I tried a few plugins and checked hidden layers too — because if a layer is hidden, Figma doesn’t show the variable info in the right panel, so it's easy to miss.

 

Page - Apply variable mode

 

Appearance - Apply variable mode

Later, I used the "Apply Variable Mode" tool. I checked each page — if the ghost variable still showed up in the dropdown, I clicked into each section, then frame by frame, layer by layer, until I replaced everything. It took 2 full days, but finally the ghost variable disappeared from the dropdown.

 

Luckily my file isn't too big yet — just around 8 pages with 6–7 UIs per page. I’ve only used Figma for 6 months (I was an Adobe XD user for 7 years), and overall I really like Figma, even though it's still a bit buggy sometimes (well… my product has bugs too haha).

 

--

My tip: If you're starting a design system, plan early and plan big. Or else you’ll end up like me… keep fixing and adjusting over and over 😂


while i love the ingenuity everyone has shown with filling the gaps, whether they’re plugins or manually (and painstakingly) going through things layer-by-layer, this shouldn’t be the expected outcome for a tool that’s supposed to help us do our work? anyway, posting cause i don’t think this is solved because i have to actually involve support in my file to fix AND it keeps happening. please fix this.


Although there seems to be a range of issues people are experiencing in this thread, some of them may be resolved with the aid of a new plugin I built that can help identify stray variables or components that are still attached to a node somewhere in your file. You may have to run the plugin one page at a time for bigger files for now (it can timeout on whole file scans if the project file is large). Hoping this helps some others like it did for me. 

Stray Component & Variable Finder

THANK YOU - this WORKS!


Reply