Uploading a sketch from the IDE via ICSP will erase the bootloader, leaving just the sketch in flash memory.