# unregister

**URL:** <https://forum.ansible.com/t/unregister/17213>\
**Category:** Ansible Project\
**Created:** [January 8, 2015, 12:05am UTC](https://forum.ansible.com/t/unregister/17213 "2015-01-08T00:05:38Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![hce](https://avatars.discourse-cdn.com/v4/letter/h/c0e974/32.png) [@hce](https://forum.ansible.com/u/hce)\
**Post date:** [January 8, 2015, 12:05am UTC](https://forum.ansible.com/t/unregister/17213/1 "2015-01-08T00:05:38Z")

</div>

Hi,

I need to unregister a variable after using (the following statement is meaningless, it just gives you an example), but I could not find a module called unregister or clear, or reset the register variable, please advice.

- name: register something  
register: temVariable  
when: temVariable is not defined

- name: check temVariable  
shell: runsomething  
when: temVariable is defined

- name: unregister temVariable  
unregister: temVariable  
when: temVariable is defined

Thank you.

- j
