And we want to delete all lines that don’t contain calculate. We can do that with :v. Simply running:

:v/calculate/d

Source: Deleting Lines that don’t Match a Pattern