Which memory have you run out of, flash or RAM? It is often possible to change the code to reduce usage of one or other or both, but you need to post your code if you want specific advice. Once you have applied the main techniques, if you are still running out then the best option may be to switch to a processor with more resources, e.g. a Mega or a Teensy.
You can move to a board with a '1284P chip if you need more SRAM - 16K, twice what a Mega has.
I offer a 1284P that you assemble. 128K flash, 16K sram, dual serial ports, 32 IO pins. Cross Roads Electronics for PL and schematic
$5 mailed to US locations. Order parts you need, or scrounge your parts bin.