How to delete values based on non-existence of a tag

I recently added a global tag to all my Telegraf instances to be able to determine which data is sent from which instance. I use one Telegraf instance per device being polled, so I set the key of the global tag to “device” with the respective device as value. Now I downloaded the already recorded data, added the “device” tag and wrote the data back to the database. Next I wanted to delete the data that does not have a “device” tag. Unfortunately I only found in the documentation how to delete data due to existing tags, but not how to delete data due to non-existing tags. I found out that Flux has this ability, but I couldn’t find any way to use this method with the CLI or the API to delete the data. If I define a predicate, which is too loose, I would delete more data than desired. Is there a way to define a predicate which selects all data with - for example - a specific “name” tag AND no “device” tag?