The built-in way
Eject it, then trash it
- Make sure the app is in Applications (drag it there from the disk image window if you haven’t).
- In the Finder sidebar, click the eject button next to the disk image, or drag its icon on the Desktop to the Trash.
- Select the .dmg file in Downloads and press ⌘⌫.
If the app runs from the disk image window instead of Applications, it isn’t installed yet. Copy it to Applications first.