Make sure the media is not being used.
Remember, media is “being used” if a shell or an application is accessing any of its files or directories. If you are not sure whether you have found all users of a CD (a shell hidden behind a desktop tool might be accessing it), use the fuser command, as described in How to Find Out If Removable Media Is Still in Use.
Eject the media.
# eject media |
For example, for a CD, you would do the following
# eject cdrom |
For example, for a PCMCIA memory card, you would do the following:
# eject pcmem0 |