# delete tag problem

**URL:** https://discussions.unity.com/t/delete-tag-problem/513722
**Category:** Interface
**Created:** [August 30, 2013, 1:25am UTC](https://discussions.unity.com/t/delete-tag-problem/513722 "2013-08-30T01:25:49Z")
**Posts on this page:** 10
**Page:** 1

<div class="post-metadata">

### Author: ![Ledrion](https://avatars.discourse-cdn.com/v4/letter/l/f08c70/32.png) [@Ledrion](https://discussions.unity.com/u/Ledrion)
#### Post date: [August 30, 2013, 1:25am UTC](https://discussions.unity.com/t/delete-tag-problem/513722/1 "2013-08-30T01:25:49Z")

</div>

Have unused tags in inspector. Have erased and or deleted them but they continue to reappear. It will ‘reload’ them on a scene change or reopening program. Have deleted tagmanager file and notice that they along with some more get rewritten at startup. Also have thought to make sure no script or object refers to the tags anymore.  
Have tried looking for answer but can not find one so I am hoping community can help?

---

<div class="post-metadata">

### Author: ![gameDevi](https://dub1.discourse-cdn.com/unity/user_avatar/discussions.unity.com/gamedevi/32/380086_2.png) [@gameDevi](https://discussions.unity.com/u/gameDevi)
#### Post date: [December 9, 2015, 6:21pm UTC](https://discussions.unity.com/t/delete-tag-problem/513722/2 "2015-12-09T18:21:30Z")

</div>

This is an old thread but this is happening to me in Unity 5.2.3

Any ideas to solve this problem?

---

<div class="post-metadata">

### Author: ![Sinci1](https://avatars.discourse-cdn.com/v4/letter/s/ecd19e/32.png) [@Sinci1](https://discussions.unity.com/u/Sinci1)
#### Post date: [June 5, 2016, 8:14am UTC](https://discussions.unity.com/t/delete-tag-problem/513722/3 "2016-06-05T08:14:21Z")

</div>

have you figured it out?

---

<div class="post-metadata">

### Author: ![ArachnidAnimal](https://avatars.discourse-cdn.com/v4/letter/a/4491bb/32.png) [@ArachnidAnimal](https://discussions.unity.com/u/ArachnidAnimal)
#### Post date: [June 5, 2016, 8:40pm UTC](https://discussions.unity.com/t/delete-tag-problem/513722/4 "2016-06-05T20:40:55Z")

</div>

> [@Sinci1](#):
>
> have you figured it out?

This thread is almost three years old. So I assume you are having the same issue.  
If you delete a tag, the tag will automatically be re-added to the list of tags if there is an existing game object in the scene which uses the tag. So you have to find the gameobject which is using the tag you’re trying to delete.  
You can use GameObject.FindGameObjectsWithTag(string tag), to find the culprit.  
[http://docs.unity3d.com/ScriptReference/GameObject.FindGameObjectsWithTag.html](http://docs.unity3d.com/ScriptReference/GameObject.FindGameObjectsWithTag.html)  
Note the gameobject must be active or unity won’t find the gameobject.

---

<div class="post-metadata">

### Author: ![GXMark](https://avatars.discourse-cdn.com/v4/letter/g/f19dbf/32.png) [@GXMark](https://discussions.unity.com/u/GXMark)
#### Post date: [January 10, 2017, 9:29am UTC](https://discussions.unity.com/t/delete-tag-problem/513722/5 "2017-01-10T09:29:15Z")

</div>

Don’t forget you also need to search through your prefabs in the project as the tag be assigned here also. This will also stop the tag from being deleted.

---

<div class="post-metadata">

### Author: ![elich11](https://avatars.discourse-cdn.com/v4/letter/e/b19c9b/32.png) [@elich11](https://discussions.unity.com/u/elich11)
#### Post date: [September 3, 2019, 2:22pm UTC](https://discussions.unity.com/t/delete-tag-problem/513722/6 "2019-09-03T14:22:54Z")

</div>

In my case (unity 2019.1.11f1), after some tags deletions, the method:  
GameObject.FindGameObjectWithTag  
Stoped working as expected, and didn’t find some existing tags.  
Restart to the editor fixed it, I stopped seeing the in the Tags editor, and  
the above method stated to work.

---

<div class="post-metadata">

### Author: ![ShubhamVIne](https://avatars.discourse-cdn.com/v4/letter/s/c4cdca/32.png) [@ShubhamVIne](https://discussions.unity.com/u/ShubhamVIne)
#### Post date: [September 25, 2021, 3:31pm UTC](https://discussions.unity.com/t/delete-tag-problem/513722/7 "2021-09-25T15:31:07Z")

</div>

> [@GXMark](#):
>
> Don’t forget you also need to search through your prefabs in the project as the tag be assigned here also. This will also stop the tag from being deleted.

This helped me in 2021

---

<div class="post-metadata">

### Author: ![CheapGSean](https://avatars.discourse-cdn.com/v4/letter/c/b19c9b/32.png) [@CheapGSean](https://discussions.unity.com/u/CheapGSean)
#### Post date: [March 13, 2023, 9:11am UTC](https://discussions.unity.com/t/delete-tag-problem/513722/8 "2023-03-13T09:11:45Z")

</div>

Helpful tip for anyone experiencing this:

If you want to quickly change all of the objects with a specific tag in your scenes and prefabs (as for Unity to FINALLY let you delete the tag), use an extended text editor like Notepad++ to replace the exact string of your tag in all of your \*.unity (scene) and \*.prefab files in your project.

Example:

I have a tag I no longer use scattered around my game called “Now\_Unused” and I want to get rid of it after first setting all objects with the tag as Untagged.

In Notepad++, open the Find dialogue (Search-\>Find or Ctrl+F), click on the “Find in Files” tab, and write “Now\_Unused” into the Find box, “Untagged” into the Replace box, set the file filters to be “\*.unity \*.prefab” and set the find Directory to be your project’s assets folder.

![8872314--1211433--upload_2023-3-13_5-9-51.png](https://europe1.discourse-cdn.com/unity/original/4X/3/1/9/3192e21184adedd9e86c1156fd710709496428d9.png)

Click on “Replace in Files”, and it’s done. Mass untagging complete! Now, Unity will _finally_ let you remove it! Gahhhh!!!

---

<div class="post-metadata">

### Author: ![CC\_YN](https://avatars.discourse-cdn.com/v4/letter/c/ba8739/32.png) [@CC\_YN](https://discussions.unity.com/u/CC_YN)
#### Post date: [April 30, 2023, 4:54am UTC](https://discussions.unity.com/t/delete-tag-problem/513722/9 "2023-04-30T04:54:08Z")

</div>

> [@CheapGSean](#):
>
> Helpful tip for anyone experiencing this:
> 
> If you want to quickly change all of the objects with a specific tag in your scenes and prefabs (as for Unity to FINALLY let you delete the tag), use an extended text editor like Notepad++ to replace the exact string of your tag in all of your \*.unity (scene) and \*.prefab files in your project.
> 
> Example:
> 
> I have a tag I no longer use scattered around my game called “Now\_Unused” and I want to get rid of it after first setting all objects with the tag as Untagged.
> 
> In Notepad++, open the Find dialogue (Search-\>Find or Ctrl+F), click on the “Find in Files” tab, and write “Now\_Unused” into the Find box, “Untagged” into the Replace box, set the file filters to be “\*.unity \*.prefab” and set the find Directory to be your project’s assets folder.
> 
> Click on “Replace in Files”, and it’s done. Mass untagging complete! Now, Unity will _finally_ let you remove it! Gahhhh!!!

You just saved my day!!!  
BTW, you can specify the search by adding m\_TagString: ![8982496--1236010--upload_2023-4-30_12-54-8.png](https://europe1.discourse-cdn.com/unity/original/4X/e/8/9/e89cd84e41fca3c9a3323ce6f307c09d62a8d62f.png)

---

<div class="post-metadata">

### Author: ![IllTemperedTunas](https://dub1.discourse-cdn.com/unity/user_avatar/discussions.unity.com/illtemperedtunas/32/883529_2.png) [@IllTemperedTunas](https://discussions.unity.com/u/IllTemperedTunas)
#### Post date: [December 24, 2024, 12:53am UTC](https://discussions.unity.com/t/delete-tag-problem/513722/10 "2024-12-24T00:53:50Z")

</div>

> [@CheapGSean](#):
>
> ![8872314--1211433--upload_2023-3-13_5-9-51.png](https://europe1.discourse-cdn.com/unity/original/4X/3/1/9/3192e21184adedd9e86c1156fd710709496428d9.png)

This is awesome! Wouldn’t have been able to clean up my tag system without this.

But there WERE some stragglers even after finding and replacing.

If you have prefabs with nested prefabs in them, it’s possible for those to be set to a different tag and this will not fix those edge cases

I found the best way to find these (if you happen to have a scene with most your assets in them), is alt click the collapse arrow at the top of your scene window twice, this will expose all assets and sub assets. Start at the top of the list and just hold the down arrow until you see an unusual tag pop up in the inspector window.
