:vglobal helps you find all the other lines
Given a file like:
cat
dog
elephant
dog
mouse
You may want to delete all lines that are not 'dog'
:v/dog/d.
Will find all the lines that are NOT dog, and delete them.
:v
is short for :vglobal
, also equivalent to :g!