Select the whole tag name database, delete, and answer one prompt for each tag the editor identifies as used. A 25,000-tag project with 99% unused tags comes down to about 250 responses instead of 24,750 single deletions. Save a copy first and keep the original until the cleaned project runs.
You can clear thousands of unused tags in one selection. Click the first row of the tag name database, scroll to the end, hold Ctrl+Shift and click the last row, then choose Delete. The editor removes every unused tag in the selection and stops at each tag it identifies as used, one prompt per tag, and that tag stays unless you approve it. On a 25,000-tag project where 99% of the tags are unused, the pass comes down to about 250 prompts. Save a copy of the project first and run the whole job on the copy.
What the bulk pass does
The tag name database holds every tag the project owns, used or not. A range selection takes in every row between your first click and your last. When you delete a selection spanning the whole list, the editor clears the unused tags and interrupts the pass at each used tag for your response. That stop is protection, and it is also your review list: every tag the editor halts on is a tag the project still references somewhere.
Check first whether your editor already has the shortcut. Some editors in this class offer a filter that shows unused objects in the tag view, or a dedicated delete-unused-tags command on the home menu. If yours has either, start there. The steps below are for editors with neither.
What you need before you select
- The project closed on every other computer, so the copy you edit is the only one open.
- A saved copy of the project under a new name. That copy is the working file; the original is the rollback, the same habit behind keeping a master copy of an HMI project.
- The starting tag count from the database. Export the tag database to CSV and you also hold a searchable record of every tag name as it stood before cleanup.
- A block of quiet time sized by the arithmetic in the example below.
The bulk delete, step by step
- Save the project under its cleanup name and open that copy.
- Open the tag name database and write down the total tag count. That number is the baseline for the check at the end.
- Click row 1.
- Scroll the list to the last row.
- Hold Ctrl+Shift and click the last row. Every row in between joins the selection.
- Choose Delete.
- Answer each prompt. The prompt names a tag the project still uses. Keep it unless you have already removed the screen object that uses it.
- Save the cleaned copy under its own name when the pass finishes.
Example: 25,000 tags, 99% unused
The numbers, carried through:
- Tags in use: 25,000 x 0.01 = 250 tags.
- Tags to delete: 25,000 - 250 = 24,750 tags.
- Bulk pass: one selection plus 250 prompts. Assume 5 seconds to read a prompt and click keep: 250 x 5 s = 1,250 s, about 21 minutes.
- One at a time: 24,750 deletions at the same 5 s each is 123,750 s, about 34 hours of clicking, more than four 8-hour days.
| Route | Selections | Prompts | Time at 5 s per response |
|---|---|---|---|
| Bulk select all 25,000 | 1 | 250 | about 21 minutes |
| One tag at a time | 24,750 | 0 | about 34 hours |
On this database the bulk pass is roughly a hundred times less clicking. The 5 seconds per response is a planning figure, not a measured rate; slow down for any prompt you do not recognize and the session still lands well under an hour.
Answering the used-tag prompts
Default to keep. The editor stopped because the project references the tag, and a bulk cleanup is the wrong moment to judge each reference. After the pass, the retained tags form a short review list: 250 names in the example, small enough to find which object uses each tag one by one and decide with the screen open in front of you.
If the prompts arrive faster than you can read them, close the copy without saving, reopen it, and run the list in ranges. Ctrl+click adds single rows to a selection and Ctrl+Shift+click extends it, so you can clean part of the list, save, and continue from there.
How to check the cleaned project
Reopen the saved copy and check three things:
- The tag count. In the example, 25,000 - 24,750 = 250 tags remain when every prompt got a keep. A higher number means unused tags are still in the list; a far lower one means you approved prompts you meant to keep.
- The screens. Open each screen that matters and confirm values display and entries write, the same checks you would run after any project change.
- The file set. Saving versions through a cleanup leaves old copies behind, so delete the old project revision files once the cleaned copy passes, and hold the untouched original until the cleaned project has run on the panel.
Which route to take
Recommendation: bulk-select the whole tag database and let the used-tag prompts do the filtering whenever unused tags outnumber used ones by ten to one or more; the example's 250 prompts against 24,750 deletions is that arithmetic working for you. Use your editor's unused-object filter or delete-unused command when it has one, since that route finishes with no prompts. Delete tags one at a time only on databases small enough to scan by eye, and run every route on a saved copy with the original held back until the cleaned project runs.
Questions
Does this clean up the PLC tags as well?
No. This pass edits the HMI project's tag database only. Controller tags live in the PLC program and are a separate cleanup. The order that works: list the unused tags from the controller, search the HMI project for references to each one, remove the HMI references, then delete the controller tag.
What if I approve a prompt and delete a tag that was in use?
Close the project without saving, reopen the copy, and repeat the pass, keeping that tag this time. If you already saved over the copy, restore the pre-cleanup original and start again on a fresh copy. Then find which object used the tag before you retry, so the same prompt gets a keep.
Do any editors delete unused tags in one step?
Yes. If yours has either of the shortcuts described above, use it: every tag in that selection is unused, so the pass finishes with no prompts to answer.
Can I split a 25,000-row list into smaller passes?
Yes. Ctrl+click adds single rows and Ctrl+Shift+click extends a range, so select about 5,000 rows per pass and check the project between passes. Five passes of 5,000 rows cover a 25,000-row list, and each pass ends with a save you can verify before the next.
Planning information, not legal or engineering advice. Rules differ by place: check codes and permits with your local authority and your licensed trades.