:- use_module(library(ugraphs)).
?- del_vertices([2,1], [1-[3,5],2-[4],3-[],4-[5], 5-[],6-[],7-[2,6],8-[]], NL). NL = [3-[],4-[5],5-[],6-[],7-[6],8-[]]