# Deleting Large Amount of Tags from Tag Browser

**URL:** <https://forum.inductiveautomation.com/t/deleting-large-amount-of-tags-from-tag-browser/82741>\
**Category:** Ignition\
**Created:** [December 5, 2023, 8:36pm UTC](https://forum.inductiveautomation.com/t/deleting-large-amount-of-tags-from-tag-browser/82741 "2023-12-05T20:36:36Z")\
**Posts on this page:** 19\
**Page:** 1

<div class="post-metadata">

**Author:** ![Liam\_Dietrich](https://avatars.discourse-cdn.com/v4/letter/l/b5a626/32.png) [@Liam\_Dietrich](https://forum.inductiveautomation.com/u/Liam_Dietrich)\
**Post date:** [December 5, 2023, 8:36pm UTC](https://forum.inductiveautomation.com/t/deleting-large-amount-of-tags-from-tag-browser/82741/1 "2023-12-05T20:36:37Z")

</div>

I accidently added all of the controller tags from a PLC, including thousands of tags I do not need.

Every time I attempt to delete the tags the Gateway crashes and I need to restart it. Are there any tricks or tips to deleting a large amount of tags at once?

---

<div class="post-metadata">

**Author:** ![ryan.white](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/ryan.white/32/73193_2.png) [@ryan.white](https://forum.inductiveautomation.com/u/ryan.white)\
**Post date:** [December 5, 2023, 8:46pm UTC](https://forum.inductiveautomation.com/t/deleting-large-amount-of-tags-from-tag-browser/82741/2 "2023-12-05T20:46:01Z")

</div>

Maybe try scripting something using `system.tag.deleteTags()`? It takes a list of tag paths so if you grab a list via `system.tag.browse` or `system.tag.getConfiguration`. Check the manual pages for more information on them.

---

<div class="post-metadata">

**Author:** ![Estera\_Cioroch](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/estera_cioroch/32/59889_2.png) [@Estera\_Cioroch](https://forum.inductiveautomation.com/u/Estera_Cioroch)\
**Post date:** [December 5, 2023, 8:57pm UTC](https://forum.inductiveautomation.com/t/deleting-large-amount-of-tags-from-tag-browser/82741/3 "2023-12-05T20:57:49Z")

</div>

> [@Liam\_Dietrich](#):
>
> Every time I attempt to delete the tags the Gateway crashes and I need to restart it. Are there any tricks or tips to deleting a large amount of tags at once?

If you go to the Gateway under Status \> Systems \> Tags, what is your tag count? Does the Gateway crash when you delete just a few tags? Finally, do you have the tags organized in folders in the Tag Browser?

---

<div class="post-metadata">

**Author:** ![Liam\_Dietrich](https://avatars.discourse-cdn.com/v4/letter/l/b5a626/32.png) [@Liam\_Dietrich](https://forum.inductiveautomation.com/u/Liam_Dietrich)\
**Post date:** [December 5, 2023, 9:21pm UTC](https://forum.inductiveautomation.com/t/deleting-large-amount-of-tags-from-tag-browser/82741/4 "2023-12-05T21:21:25Z")

</div>

I appreciate the suggestion. Unfortunately using scripts resulted in the same issue.

---

<div class="post-metadata">

**Author:** ![Liam\_Dietrich](https://avatars.discourse-cdn.com/v4/letter/l/b5a626/32.png) [@Liam\_Dietrich](https://forum.inductiveautomation.com/u/Liam_Dietrich)\
**Post date:** [December 5, 2023, 9:24pm UTC](https://forum.inductiveautomation.com/t/deleting-large-amount-of-tags-from-tag-browser/82741/5 "2023-12-05T21:24:43Z")

</div>

I checked the tag count is 138,118.

I am able to delete tags one-by-one. But obviously that will take a long-time.

All of the tags I am looking to delete are in one folder, which contains sub-folders.

---

<div class="post-metadata">

**Author:** ![ryan.white](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/ryan.white/32/73193_2.png) [@ryan.white](https://forum.inductiveautomation.com/u/ryan.white)\
**Post date:** [December 5, 2023, 9:26pm UTC](https://forum.inductiveautomation.com/t/deleting-large-amount-of-tags-from-tag-browser/82741/6 "2023-12-05T21:26:30Z")

</div>

Make the script delete in chunks, like maybe 100 or 1000 at a time? Then either let that loop a few times or manually run it a few times until the number gets a bit more manageable?

---

<div class="post-metadata">

**Author:** ![GregCavazos](https://avatars.discourse-cdn.com/v4/letter/g/ee7513/32.png) [@GregCavazos](https://forum.inductiveautomation.com/u/GregCavazos)\
**Post date:** [December 5, 2023, 9:26pm UTC](https://forum.inductiveautomation.com/t/deleting-large-amount-of-tags-from-tag-browser/82741/7 "2023-12-05T21:26:31Z")

</div>

We had a similiar issue deleting a large amount of tags, but in our case it only crashes when the tags are inside the UDT area.

Only solution was delete by smaller batches.

The issue in our case was related to the internal configuration DB getting locked and creating a cascading lock.

---

<div class="post-metadata">

**Author:** ![Estera\_Cioroch](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/estera_cioroch/32/59889_2.png) [@Estera\_Cioroch](https://forum.inductiveautomation.com/u/Estera_Cioroch)\
**Post date:** [December 5, 2023, 9:40pm UTC](https://forum.inductiveautomation.com/t/deleting-large-amount-of-tags-from-tag-browser/82741/8 "2023-12-05T21:40:28Z")

</div>

> [@ryan.white](#):
>
> Make the script delete in chunks

and

> [@GregCavazos](#):
>
> delete by smaller batches

We all seem to be thinking the same thing...

@Liam_Dietrich I know its not an instantaneous solution but might be worth a shot. 🤷‍♀️

---

<div class="post-metadata">

**Author:** ![Liam\_Dietrich](https://avatars.discourse-cdn.com/v4/letter/l/b5a626/32.png) [@Liam\_Dietrich](https://forum.inductiveautomation.com/u/Liam_Dietrich)\
**Post date:** [December 6, 2023, 1:43pm UTC](https://forum.inductiveautomation.com/t/deleting-large-amount-of-tags-from-tag-browser/82741/9 "2023-12-06T13:43:25Z")

</div>

Thank you @ryan.white, @GregCavazos , and @Estera_Cioroch for the suggestions.

After leaving the Gateway overnight, the tags have been deleted. Thus, I believe deleting the tags with scripting did in fact work. If anyone else does encounter this issue I would recommend delete the tags in chunks using scripting, as suggested by @ryan.white.

I used the following two functions in the script to access the paths and deletes the tags, respectively:

```auto
system.tag.browse()
system.tag.deleteTags()

```

---

<div class="post-metadata">

**Author:** ![jlandwerlen](https://avatars.discourse-cdn.com/v4/letter/j/bc8723/32.png) [@jlandwerlen](https://forum.inductiveautomation.com/u/jlandwerlen)\
**Post date:** [December 6, 2023, 4:01pm UTC](https://forum.inductiveautomation.com/t/deleting-large-amount-of-tags-from-tag-browser/82741/10 "2023-12-06T16:01:51Z")

</div>

> [@Liam\_Dietrich](#):
>
> I checked the tag count is 138,118.

IMO there is something else going on. I would get support involved. I have deleted over 140k tags and while it did take some time, maybe 20 seconds, it didn't crash.

---

<div class="post-metadata">

**Author:** ![Liam\_Dietrich](https://avatars.discourse-cdn.com/v4/letter/l/b5a626/32.png) [@Liam\_Dietrich](https://forum.inductiveautomation.com/u/Liam_Dietrich)\
**Post date:** [December 6, 2023, 4:19pm UTC](https://forum.inductiveautomation.com/t/deleting-large-amount-of-tags-from-tag-browser/82741/11 "2023-12-06T16:19:14Z")

</div>

Appreciate the recommendation.

It should be noted that these tags are were added to a laptop that I am using for development, not a dedicated Gateway PC. Could it be possible that the limited resources of the laptop could be the culprit?

---

<div class="post-metadata">

**Author:** ![jlandwerlen](https://avatars.discourse-cdn.com/v4/letter/j/bc8723/32.png) [@jlandwerlen](https://forum.inductiveautomation.com/u/jlandwerlen)\
**Post date:** [December 6, 2023, 4:21pm UTC](https://forum.inductiveautomation.com/t/deleting-large-amount-of-tags-from-tag-browser/82741/12 "2023-12-06T16:21:40Z")

</div>

I'm on a laptop as well, and using the "stock" gateway settings. Ignition is installed on the host, not a VM.

---

<div class="post-metadata">

**Author:** ![louagejasper](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/louagejasper/32/86311_2.png) [@louagejasper](https://forum.inductiveautomation.com/u/louagejasper)\
**Post date:** [December 20, 2023, 10:08am UTC](https://forum.inductiveautomation.com/t/deleting-large-amount-of-tags-from-tag-browser/82741/13 "2023-12-20T10:08:41Z")

</div>

We have the same issue. Deleting large amounts of tags crashes the server (8.1.26).  
Isn't this something IA should be able to fix quite easily?

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [December 20, 2023, 12:09pm UTC](https://forum.inductiveautomation.com/t/deleting-large-amount-of-tags-from-tag-browser/82741/14 "2023-12-20T12:09:27Z")

</div>

> [@louagejasper](#):
>
> quite easily?

No, tag deletion (or bulk creation) is a very memory-intensive operation, and the defaults in `ignition.conf` aren't sufficient for manipulating tens of thousands of tags at once. (In most cases.)

Use better gateway hardware with more RAM for Ignition, or discipline yourself when working in wimpy systems.

---

<div class="post-metadata">

**Author:** ![louagejasper](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/louagejasper/32/86311_2.png) [@louagejasper](https://forum.inductiveautomation.com/u/louagejasper)\
**Post date:** [December 20, 2023, 12:18pm UTC](https://forum.inductiveautomation.com/t/deleting-large-amount-of-tags-from-tag-browser/82741/15 "2023-12-20T12:18:50Z")

</div>

Our RAM and CPU are not going over 30% while deleting, we are using pretty good hardware here.

I'm not saying tag deletion would not be intensive, but I do believe standard actions like tag deletion you execute in the designer should not cause a server crash in any case.

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [December 20, 2023, 12:23pm UTC](https://forum.inductiveautomation.com/t/deleting-large-amount-of-tags-from-tag-browser/82741/16 "2023-12-20T12:23:56Z")

</div>

Then something else is going on. By "crashed", do you mean the gateway process died (and restarted itself)? Or did you get an "Internal Error" on the gateway web interface? The latter is not a crash, and commonly occurs when the config database is locked for an excessive length of time--common with bulk tag operations.

Consider having support look at your environment.

---

<div class="post-metadata">

**Author:** ![louagejasper](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/louagejasper/32/86311_2.png) [@louagejasper](https://forum.inductiveautomation.com/u/louagejasper)\
**Post date:** [December 20, 2023, 12:37pm UTC](https://forum.inductiveautomation.com/t/deleting-large-amount-of-tags-from-tag-browser/82741/17 "2023-12-20T12:37:13Z")

</div>

> [@pturmel](#):
>
> Or did you get an "Internal Error" on the gateway web interface

Yes, this. But it stayed like this for over 20 minutes, which made us restart the gateway.  
Support took many looks at our environment, we designed the whole system together with Kevin McClusky from IA.

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [December 20, 2023, 12:43pm UTC](https://forum.inductiveautomation.com/t/deleting-large-amount-of-tags-from-tag-browser/82741/18 "2023-12-20T12:43:31Z")

</div>

> [@louagejasper](#):
>
> But it stayed like this for over 20 minutes

Yes, the internal database is single-threaded, and all of the changes to tag configuration have to be written to it. (Which explains why your CPU wasn't pegged.) This is one of the few cases where the speed of the gateway's own storage devices matter. If you had continued waiting, your system would have eventually finished the bulk tag operation.

I've bumped into this many times this year as I test my EtherNet/IP driver with PLCs of tens and hundreds of thousands of tags. But the delays using NVMe storage are tens of seconds, not tens of minutes.

Not a bug, really. Just slow.

---

<div class="post-metadata">

**Author:** ![louagejasper](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/louagejasper/32/86311_2.png) [@louagejasper](https://forum.inductiveautomation.com/u/louagejasper)\
**Post date:** [December 20, 2023, 12:49pm UTC](https://forum.inductiveautomation.com/t/deleting-large-amount-of-tags-from-tag-browser/82741/19 "2023-12-20T12:49:07Z")

</div>

Ok, thanks for the explanation. The single-threadness explains the cpu indeed.

So it could mean our storage is slow? This is maybe something we could take up with support.

Edit: Our storage is not NVMe, but SATA
