I'm not sure I follow. Ideally your bare metal machines have an easy bare OS with some config that is easy to repave, and are ephemeral-ish (not a lot of state).
Your "machine for testing" would be a container. Decommissioning a container is easy. Decommissioning a physical machine only happens when it's obsolete.
sigh Not everything in the world is containers. Applications running outside of container still exist in many companies for various reasons including political ones.