Delete everything but selection?

I’m trying to delete parts of a mesh that I don’t need, but I want to know if theres a quick and precise way to delete them.

Like say a key that deletes everything but what you have selected?

Invert selection then delete.
From memory Ctrl+I / X

In Edit mode, menu select, Select > Inverse.