Unable to delete list

I’m trying to delete a list (IP list) but get:-

“This rule is being used in 3 filter expressoins and cannot be deleted”

Even though I can’t seem to find the list used in any of my expressions.

Others have had this problem too:-

In this thread I found

"This is a known defect with lists and deleted zones and I do not see an eta on a fix, I am digging for some more details. [by @cloonan]

Another post about this problem with no solution…

P.S This is not the first time that I’ve had a problem that something that I’ve “deleted” from Cloudflare settings still exists and haunts me. Once it was a setting that I set on a paid plan that was left on when I went back to the free plan. Had to resubscribe in order to turn it off…

I have included this thread in my escalation here:

If this ever happens again please let us know, you shouldn’t have to pay to turn off features after you downgrade and this can usually be manually resolved for you.

2 Likes

Hi @cybe, sorry about the inconvenience here.

Just wanted to update this topic to let you know the right teams are aware of this issue. I will let you know when a fix is released.

A workaround you can use in the meantime is to delete the entries in the old list and reuse the list but with a new set of details. I understand this isn’t ideal but it’s all we have at the moment, sorry!

1 Like

To solve this issue until a fix comes out, is to open up a terminal window and run this command:

Change the <ZONE_ID> to the current website Zone ID you’re viewing - located bottom right of the Overview Page
Change the <EMAIL> with the one used for your account (e.g. [email protected])
Change the <API_KEY> found at your My Profile → API Tokens → Global API Key

(use a text editor to make the necessary changes and then copy & paste the entirety of it back into the terminal window and run it.)

curl -X GET \
"https://api.cloudflare.com/client/v4/zones/<ZONE_ID>/filters"
-H "X-Auth-Email: <EMAIL>" \
-H "X-Auth-Key: <API_KEY>"

If successful, you will see a result of, “success”: true, somewhere in the response back.

In case there are those who are reading this and don’t know where the Filter Lists are located, simply login to your account and at the bottom left of the Home page (where you select your sites), you will see Manage Account → Configurations → Lists

Find the List that won’t delete as it is shown in your account and based off the response from that command in the terminal window, you will see the id key associated with an expression with that exact same name in it. This key is referenced as the FILTER_ID in documentation and what is required in order to proceed in removing it completely from your account.

Locate the matching List name from that response, then take the ID key for it and run this command:

(use a text editor to make the necessary changes again and then copy & paste it back into the same terminal window and run it.)

curl -X GET \
"https://api.cloudflare.com/client/v4/zones/<ZONE_ID>/filters/<FILTER_ID>"
-H "X-Auth-Email: <EMAIL>" \
-H "X-Auth-Key: <API_KEY>"

After you do this, if successful, you will see a result of, “success”: true, again.
I found I had to use the GET command to find all the Filters for the current Zone ID first, then isolate the Filter ID that was unable to be deleted and THEN remove it with the following command:

curl -X DELETE \
"https://api.cloudflare.com/client/v4/zones/<ZONE_ID>/filters/<FILTER_ID>"
-H "X-Auth-Email: <EMAIL>" \
-H "X-Auth-Key: <API_KEY>"

You should see “success”: true, once again and the best part is next. Refresh the List page in your browser and you will see the Delete action is no longer greyed out anymore. Now you can enjoy clicking it!

Cheers!

Nope. Not closer. I either get the auth error or this:
curl -X GET
“http s://api.Cloudflare.com/client/v4/zones/myzone/filters”
-H “X-Auth-Email: mymail”
-H “X-Auth-Key: globalkey”
{“success”:false,“errors”:[{“code”:9106,“message”:“Missing X-Auth-Key, X-Auth-Em ail or Authorization headers”}]}
-H: command not found

I have tried on two linux machines with same results.

Finally! It works if I remove the \ from -H “X-Auth-Email: ” \

■■■■! It works on my listed domain but not on the delisted one.

I didn’t realize I had a typo \ after .

If you add that domain again and it generates a different Zone ID, and the Lists still show up, perhaps what worked above for the listed domains will then work for the existing domain since it now has a reachable Zone ID. Not sure if this is feasible…

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.