So fixing it is literally just what you’d have to do before reinstalling anyway. Reduce your root partition from a live system, increase swap partition, re-initialize swap. Done.
Also, the Debian installer tells you how big a swap partition it creates and asks you if that is what you want twice.