This command removes a hard disk, DVD, or floppy image from a Oracle VM VirtualBox media registry.
VBoxManage closemedium [disk|dvd|floppy] <uuid|filename> [--delete]
Optionally, you can request that the image be deleted. You will get appropriate diagnostics that the deletion failed, however the image will become unregistered in any case.