Remove an element of a list by name
To remove by name you could use:
a_list %>% purrr::list_modify("a" = NULL)
$`b`
[1] "qwerty"
$c
[1] "zxcvb"
I'm not sure the other answers are using the name of the element, rather than the element itself for selection. The example you gave is slightly confusing since the element 'a' both contains 'a' in it's value AND is called 'a'. So it's easy to get mixed up. To show the difference I'll modify the example slightly.
b_list <-
list(a = "bsdfg",
b = "awerty",
c = "zxcvb")
b_list %>% purrr::list_modify("a" = NULL)
returns
$`b`
[1] "awerty"
$c
[1] "zxcvb"
but
purrr::discard(b_list,.p = ~stringr::str_detect(.x,"a"))
returns
$`a`
[1] "bsdfg"
$c
[1] "zxcvb"
Keeping it full tidyverse, you could do,
purrr::discard(a_list,.p = ~stringr::str_detect(.x,"a"))