Remove a whole keyword list safely
You moved your negative keywords into a
shared set, or a keyword
list simply outlived its usefulness. Either way you’re about to delete
an entire google_ads_ad_group_criterion resource from your .bid
file — and every keyword it manages should disappear from the live
account with it.
The change
Delete the whole block:
resource "google_ads_ad_group_criterion" "winter_negatives" { ad_group = google_ads_ad_group.winter_default.id
negative_keywords { match_type = "PHRASE" texts = ["free", "cheap", "diy"] }}Plan
bidsmith plan .Expected: one - destroy row per keyword the resource managed, plus a
~ claim row on the ad group:
google_ads_ad_group.winter_default (removed negative_keyword "free" PHRASE) - destroy okgoogle_ads_ad_group.winter_default (removed negative_keyword "cheap" PHRASE) - destroy okgoogle_ads_ad_group.winter_default (removed negative_keyword "diy" PHRASE) - destroy okgoogle_ads_ad_group.winter_default ~ claim (label only; releases negative keywords)If the destroys are there, commit, PR, merge, apply as usual.
What the ~ claim rows mean
bidsmith never deletes keywords it didn’t create — someone on your
team may manage a keyword list straight in the Google Ads UI, and
bidsmith must not touch it. To tell “mine” from “not mine” without a
database, bidsmith puts a small marker label on each ad group and
campaign, one per kind of keyword list it manages there (the label is
visible in the Google Ads UI as bidsmith:owns=…).
~ claim (label only; claims negative keywords)— bidsmith is about to start managing this ad group’s negative keywords and marks that now. You’ll see these once on the first apply after declaring a list (or after upgrading bidsmith).~ claim (label only; releases negative keywords)— the last declared list of that kind is gone; bidsmith removes its marker in the same apply that removes the keywords.
label only is the important half: a claim row writes the marker and
nothing else. It never changes a keyword, a location, or any other
value on the live campaign — the rows that do that are the
+ create / ~ update / - destroy rows around it.
The markers are what keep the cleanup working even when you delete the only negative-keyword resource an ad group had — without them, bidsmith would have no way of knowing those live negatives were ever its job.
The same marker guards settings that come as a set rather than a
single value. A campaign’s
frequency caps get a
~ claim (label only; claims frequency caps) row the first time you
apply one that declares a cap; deleting every frequency_caps block
then clears the caps and drops the marker in one apply. Until that
first claim, caps somebody set in the Google Ads UI are simply not
bidsmith’s to change.
See also
- Add a whole keyword list at once — the reverse trip.
- Drift — what happens when the account and the files disagree.
- Plan and apply — why nothing
changes until you say
yes.