# 'Delete Unused Variables' does not work for local variables

**URL:** <https://forums.unrealengine.com/t/delete-unused-variables-does-not-work-for-local-variables/335087>\
**Category:** Blueprint\
**Tags:** unreal-engine, bug-report, UE4, question, Blueprint\
**Created:** [October 12, 2015, 7:18pm UTC](https://forums.unrealengine.com/t/delete-unused-variables-does-not-work-for-local-variables/335087 "2015-10-12T19:18:45Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![JmDevTx](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@JmDevTx](https://forums.unrealengine.com/u/JmDevTx)\
**Post date:** [October 12, 2015, 7:18pm UTC](https://forums.unrealengine.com/t/delete-unused-variables-does-not-work-for-local-variables/335087/1 "2015-10-12T19:18:45Z")

</div>

I am here in my function library trying to delete unused variables via Edit → Delete Unused Variables, and it is telling me that there are no variables to check for, despite me clearly having unused variables in the graph. Steps to replicate are simple, just create a function library, make a few variables, and try to delete them via the function.

---

<div class="post-metadata">

**Author:** ![Sean\_Flint](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Sean\_Flint](https://forums.unrealengine.com/u/Sean_Flint)\
**Post date:** [October 13, 2015, 8:17pm UTC](https://forums.unrealengine.com/t/delete-unused-variables-does-not-work-for-local-variables/335087/2 "2015-10-13T20:17:37Z")

</div>

Hello Jamendxman3,

I have been able to reproduce your issue, and have entered a JIRA, UE-22086. Thank you for your report.

Have a great day,

Sean Flint

---

<div class="post-metadata">

**Author:** ![EvoPulseGaming](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@EvoPulseGaming](https://forums.unrealengine.com/u/EvoPulseGaming)\
**Post date:** [January 8, 2018, 6:19pm UTC](https://forums.unrealengine.com/t/delete-unused-variables-does-not-work-for-local-variables/335087/3 "2018-01-08T18:19:57Z")

</div>

Bug still present, can we update this to 4.18?? (And all the versions in between)

---

<div class="post-metadata">

**Author:** ![Sean\_Flint](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Sean\_Flint](https://forums.unrealengine.com/u/Sean_Flint)\
**Post date:** [January 8, 2018, 6:48pm UTC](https://forums.unrealengine.com/t/delete-unused-variables-does-not-work-for-local-variables/335087/4 "2018-01-08T18:48:03Z")

</div>

Hello,

We have updated the ticket to reflect that it is still occurring as of 4.18.

Have a great day
