To unload an executable:
file (gdb mode only). do not specify any arguments to unload the current executable file. This command only unloads the current executable file.
unload [pid|filename] (IDB mode). Specify a process ID or the name of the executable file.