Thanks, I guess that's the (a?) missing piece of the puzzle. I can't find any info on what fuses to change for this though.
I've managed to upload a basic (blink) sketch on my Leonardo using "Arduino as ISP" as a programmer, but the available space does not increase. In fact, this fails on compilation, so does the arduino IDE (2.1.0) just not check available space on the board?
You will need to create a dedicated entry for a board that indicates the available memory. Locate boards.txt on your computer. I'm using Windows and can find it in C:\Users\myUserName\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6.
That determines the size that the IDE will use and when you will be over the limit; I've added a pointer in above.
If you hack the boards.txt, be aware that an update of the AVR board package will undo your changes. There is a way using your own boards.txt but I'm not sure how.