Remove all neighbors of a vertex

I have a Graph with 20 vertices, i.e. the index is 0, 1, 2,...19. Vertex with
index 12 is connected with all other vertices except 3 and 15. I want to
remove vertex 12 and all its neighbors, that is I want to keep 3 and 5 in
the graph. What should I do? I tried the remove_vertex() API, it seems there
is something wrong. I ask for help from You.

Please explain what is wrong with minimal and self-contained example
that shows the problem.