Step-by-step guide

This can be done by setting the key "deletePV" as shown:

% grib_set -s deletePV=1 in.grib out.grib

Which is in fact equivalent to setting the number of coordinate values to 0 and clearing the "pv" array:

% grib_set -s PVPresent=0,NV=0 in.grib out.grib

Afterwards you can do a check with grib_compare to see the differences:

% grib_compare in.grib out.grib
...
long [numberOfVerticalCoordinateValues]: [184] != [0]
[pv] not found in 2nd field
...