Similar to how -f can be used to squash the last n layers, it would be useful to have an argument (such as -p) to preserve the first n layers instead.
For now, this can be done manually with getting the layer count via docker history image:tag | wc -l and then subtracting the number of layers you want to preserve.