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

I have also reported it to support.


… It gets even worse if you’ve deleted a variable mode. If there are still deleted but attached variables in your file or library, then you also have to struggle with mode conflicts. In my case: I deleted a theming mode. After that I deleted a sizing variable collection (numbers). Since I’m not able to detach all deleted sizing variables – and these are applied to a lot of auto layout frames – I’m still seeing this kind of mode conflicts.


image


My workaround is now to check every component and replacing the deleted sizing variable placeholder with a raw value. Hopefully there will be an update in the near future.


FYI to folks combing through this massive thread looking for a solution: one does not exist. Ghost variables 4evah.


This is ridiculous. I can’t delete ghost variables from another file. The fact that I can apply a non-existing variable theme on a frame and it applies the styling changes to child components, despite zero connections between the 2 files, is a bug. It’s been a bug for a year, it needs to be resolved.


Example, I copy a component from one file to another. I remove all variables and references from the other file inside the component. The variable theme still shows up (e.g. light and dark mode). I can apply this theme to any frame despite it not being in the component I added.


EDIT: I found a workaround this time, to clear cache and restart the app. But, that means each component I copy over needs the ability to paste and remove variables at the same time. Otherwise every time I copy over a component requires me to clear cache and restart the app - which logs me out and resets all my preferences.


Hi,


I reported the bug to Figma support.


They’ve replied that the variable detachment is limited to local variables in the file. They will discuss the issue and whether there is a need to extend the command to variables attached from added libraries.


So for the support it’s not a bug.


This seems a kind of odd to me. The more common case is that designers connect variables from added libraries, isn’t it? Especially when we are talking about design systems and (external) ui kits.


Exact same issue. Just making sure this thread gets enough attention


Nightmare, surely a simple fix? Needs prioritising!


A fix for this would be much appreciated. Bugs like this overcomplicate the design process for others involved with the project. Designers cannot pass their work on with confidence when the files aren’t clean. Any idea when we can expect a resolution?


This issue has been really bugging me for 6 months. And I did “Detach deleted variable” commend.


It really polluted the design systems file.


This is still a problem. For us I believe what the biggest challenge is that we can’t really tell if a mode is a “ghost” ie truly a mode that has no variables being used, or if we really are still using variables from a deleted mode.


Has anyone found success with some sort of linter that can check for variables with deleted modes? Unfortunately we often have to delete / replace modes for a variety of limitations with the variable setup we have today.


I found that a problem is that I run the command for detach all variables and it says 0 instances found / 0 detached. But after digging into the component I find a reference somewhere buried deep into the component.


As an example, I copy a component from our design system library over (not an instance) because I want to experiment with an alternative layout or design. It doesn’t seem to have the problem as of late (maybe the updates fixed it for me), but this was where the issue typically came from.


For instance, I would see the variable modes (light, dark) as an option even know all references to it seemed to be removed. And I could apply that mode and it would work. Maybe it’s fixed now but if I come across the problem again I will mention it.


I’m having the same issue.

I have “used” variables in my file that are not local but pulling from an entirely different file that I do not have access to. I would like to remove / detach them but I’m not able to do so after following the above recommendations.


Seems a bit silly to offer this powerful feature of variables but not provide solution for bugs when users have been expressing this issue for a year.


Totally agree. At least provide an option to disconnect those old modes. It also helps to identify and reconnect variables/tokens if the old modes is removed.


I have the same issue and it has not been solved. The quick command to detach deleted variables does not work when using bringing in components for other files or libraries. This is common practice in larger organizations and you end up with a list (often with duplicates) of “Used” variables in your files that are ghosts. Why hasn’t this issue been fully addressed and will it ever? I was hoping the new version would have addressed this… but it’s still there. PLEASE HELP


I am having the same issue. I am making a design system and have rebooted the project a few times but some things got copied over with old variables or variables from other design system component brought into the file. Very frustrating!!


I don’t think “detach deleted variables” does anything. Please help.


How did this help? Does this not just toggle the variables panel open/closed?


This simply does not work. Should I submit a bug or are the hundreds of other folks who submitted bugs enough?


Happening to me too, no plugins seem to work. Also the “detach” with CMD+P does NOTHING


We’re still getting this too – same use case as most people on here: Page Variables that can’t be removed, and ghost ones appearing despite it being a new ‘clean’ document. Definitely an issue that still needs fixing.


It’s not working, at least for me.


Why hasn’t this bug been fixed yet?


Any updates on this issue? Just spent nearly a week using the Token Studio plug-in to scrub my file layer-by-layer, page-by-page. Ghost variables are still there.


Hello boss. Figma please dooooo something. I’ve got OCD, so seeing this really bothers me.


Hi Denise,


The issue highlighted in the video is slightly different from the one many of us are experiencing. Miggi demonstrated how to delete a variable created and deleted within the current file, but the main concern arises when we copy components from a different design system into our file. These components appear as “Used Variables” in the “Apply Variable Mode” tab. The challenge is figuring out how to remove these “Used Variables” without manually detaching each padding, gap, color, typography, etc.


Upon analysis, I found that this is not a bug because once all variables from the ‘foreign’ design system are detached and the page is reloaded, the “Used Variables” no longer appear. However, doing this manually is time-consuming, and I can tell you that 99% of the time, there will always be one lost ‘foreign’ variable that prevents the “Used Variables” from being completely removed. Therefore, I would be really happy if Figma introduced a “Detach All Used Variables” command. Currently, I address this by manually detaching all linked elements and refreshing the page, as without a refresh, it takes time to update.


Figma provides a “Copy variables into this file” option when pasting a UI element from a different file, which is useful. However, that’s not quite what we need in this case; we need a way to paste elements without any styles or variables. A new context menu option for “Paste without styles/variables” would be helpful.


I hope this clarifies the issue. I look forward to any ideas on adding these two features: the “Detach All Used Variables” command and the “Paste without styles/variables” functionality.


Thank you!


Reply