The branches showing in the pink/red color are remote only. These are the ones you want to ditch, if I understand correctly?
You’ve already deleted them locally, but they still exist wherever your remote is (github etc.). Basically your git repository exists as a copy on the remote, but has its own “pointers” and names for which commits its branches reference, individually from your local ones.
On the far left hand side where you have the branches sidebar open - currently highlighting on master12 as the checked out branch - further down from there you should find another section called Remotes and within that the next level down is “origin”.
To be clear, I’m highlighting the same section with a yellow underline, but from another repo I have here:
If you look/expand there in your repo, that’s where you should find the branches for master, master2, …, master5 that are showing in pink/red. Right-clicking on those should give the option to (say for example) “Delete origin/master3” which will then act on the remote. Do that for each one you want to get rid of, but do take care not to remove those others it looks like you want to keep - e.g. origin/master8+