If you will no longer be using a removable media database, it can be uninstalled using the sp_dbremove stored procedure. The removable media does not need to be in the drive for you to uninstall the database.
The sp_dbremove stored procedure removes the entries in sysdatabases and sysusages for the specified database. If the dropdev keyword is included, it also removes from sysdevices all devices of which that database has exclusive use. It does not delete the physical operating system files for the devices.
sp_dbremove database[,dropdev]
where
For example, to remove the sales database and drop all its devices, type:
sp_dbremove sales,dropdev
The sp_dbremove stored procedure can be used to remove all databases, not only those on removable media.
Note After you remove a database you should back up the master database.
For more information about using sp_dbremove, see the sp_dbremove System Stored Procedure topic in the Microsoft SQL Server Transact-SQL Reference.