Deleting DMG file from Trash

Why can’t I delete the .dmg file from the Trash? I get an “in use” error, although it is not. I placed the files in a folder in Applications and closed the dmg file, then placed in Trash. Where did I go wrong?

Thanks for the help.

Open Finder. You should see the DMG in the left-hand pane under “Devices”. Right-click or control-click over the DMG and eject it, then you can delete it from Trash.