The issue is because deletion redirects to the new filter page. Which thus creates a new filter. See more details in my bug which happened to be a duplicate: Deleting a network-wide filter creates a new filter in its place
Workarounds
Manual
To get rid of filters once and for all, you can hit the deletion URL with the filter ID https://stackexchange.com/filters/delete/454503
and not follow the redirection. The simplest way is:
Go to https://stackexchange.com/filters/
Find the ID of the filter you want deleted. This would be in the URL:
Open the console and execute the following making sure the ID is replaced
fetch("https://stackexchange.com/filters/delete/<filter_id_goes here>", { redirect: "manual" })
For example if you want to delete filter with ID 454506 the correct URL would be https://stackexchange.com/filters/delete/454506
IMPORTANT! Then navigate to a different filter. If you simply refresh the page, you get the same thing again and a new filter will be created.
Bookmarklet
The steps above can be executed by a bookmarklet. Select a custom filter (it will not run for the default two on top) and run it. This will take the filter ID, delete the filter then move you to the top most filter to avoid creating a new one
Code for bookmarklet
javascript:(function(){const%20currentFilter=document.querySelector(%22%23sideBar%20.filters%20ul:nth-of-type(2)%20li.current%20.filter-name%20a%22);if(!currentFilter)return;const%20pathSegments=currentFilter.pathname.split(%22/%22),filterId=pathSegments[pathSegments.length-2],firstFilter=document.querySelector(%22%23sideBar%20.filters%20ul:nth-of-type(1)%20li:nth-child(1)%20.filter-name%20a%22);fetch(`https://stackexchange.com/filters/delete/${filterId}`,{redirect:%22manual%22}).then(()=%3Elocation.href=firstFilter.href)})();
Expanded code
(function() {
const currentFilter = document.querySelector("#sideBar .filters ul:nth-of-type(2) li.current .filter-name a");
if (!currentFilter)
return;
const pathSegments = currentFilter.pathname.split("/");
const filterId = pathSegments[pathSegments.length - 2];
const firstFilter = document.querySelector("#sideBar .filters ul:nth-of-type(1) li:nth-child(1) .filter-name a");
fetch(`https://stackexchange.com/filters/delete/${filterId}`, { redirect: "manual" })
.then(() => location.href = firstFilter.href);
})();
Userscript
I published a userscript that fixes the behaviour of filter deletion on StackApps visit the page for more details.
For convenience, the short version is here:
Direct install (GitHub)
See the code on GitHub
(For instructions how to install userscripts: see the tag wiki here)