The following assumes you have an SD card with Raspbian Stretch Lite on it, and that all commands are run on a separate (from your Raspberry Pi) Linux machine (or VM).
Some of this was adapted from here.
- Put your SD card in an SD card reader
- Run gparted:
sudo gparted