Search
Contact salesTry for free

Step-by-step guide to deleting a GTM container

Uliana Lesiv

Uliana Lesiv

Author
Updated
Apr 3, 2026

Whether you're retiring an old setup or switching to a new one, knowing how to properly remove a GTM container keeps your tracking clean and your website conflict-free.

Note: before you begin, we recommend you to export your container as a JSON backup file in case you need it later.

Overall, deleting a GTM container is pretty straightforward:

  1. Log in to Google Tag Manager and select the appropriate account.
  2. Click the Admin tab and select the container you want to delete.
  3. Go to Container Settingsthree-dot menuDelete, then confirm.
  4. Remove the GTM code snippets from your website's head and body sections (or deactivate the GTM plugin if you used one).
  5. Clear your site's cache and verify the snippet is gone by checking the page source.

The full detailed guide with step-by-step instructions and screenshots is available further in this article.

Before deleting the GTM container

Before deleting the GTM container, it is worth exporting its current version. This will be helpful if you decide to recover it or use the previous configurations as a reference for a new container.

To export the container, choose the container you want to delete (steps 1 and 2 below show how to do this), click Export Container → choose a container workspace or version to export.

Export GTM container

Click Export in the upper right corner. The file in JSON format will be downloaded to your computer. Keep the file in a secure location so you can access it later if necessary.

Click export

How to delete a GTM container

Step 1. Access GTM account

Navigate to GTM → choose an account (in case you have a few) that has the container you want to delete.

Choose an account in GTM

Step 2. Navigate the container you want to delete

Click on the Admin tab, and in the column on the right side, choose the container you want to delete if you have a few containers.

Containers in GTM

Step 3. Delete container

To delete the container, click on Container Settings → three dots in the upper right corner → select Delete. This action will trigger a confirmation dialog to ensure the user is certain about the deletion.

Container Settings in GTM

How to remove a GTM container from a website

Remove the snippet from the website

Removing the GTM code snippet depends on how you added it to the website - manually or using plugins for CMS.

Remove manually

  1. Open your website’s source code.
  2. Locate the GTM container code, which is typically found in two places:

The <head> section:

GTM snippet on the website

And <body> section:

GTM snippet

You should delete both of these snippets and save the changes.

Remove GTM from the CMS plugin

If you have used the plugin to add the GTM snippet code, you can deactivate or remove the plugin.

Clear cache and verify GTM code removal

Clear your website’s cache and open your site in an incognito window. Check the source code (right-click → "View Page Source") and search “gtm.js” to make sure that the GTM snippet is gone.

View page source

How to delete a Google Tag Manager account

  1. Open your GTM account and navigate to the Admin tab.
  2. Under the Account column, select Account Settings.
  3. Click the three-dot menu in the upper right corner and choose Delete.
  4. Confirm the action by clicking the checkbox and then Delete.

How to delete Google tags

  • On the Tag Manager Accounts screen, click on the Google tags tab.
  • Select the Google tag you’d like to delete.
  • Go to the Admin tab.
  • In the Manage Google tag section, select Delete from the three-dot menu.
  • Click the checkbox to confirm you understand, then click Delete.

FAQs

To sum up

Managing your Google Tag Manager account requires careful consideration and attention to detail. Deleting or restoring containers is a part of GTM account management. Before deleting a container, it is worth exporting a file with container configuration if you need it in the future. After deleting a container, update the code snippets on your website to avoid conflicts and ensure precise data collection.

Want to start using server-side tags?

Stape has lots of options! Click on Try for free to register and check all the benefits.

Try for free
author

Uliana Lesiv

Author

Uliana is a Content Manager at Stape, specializing in analytics and integration setups. She breaks down complex tracking concepts into clear insights, helping businesses optimize data collection.

Comments

Try Stape for all things server-side

What’s going on?

Where are we going?

Attention!
This is a stand-up dog zone.