How to reset an older Mac mini
How to do a factory reset
How to do a factory reset
What year model is the Mac Mini?
see > Identify your Mac mini model - Apple Support
If it is running High Sierra or later, startup in macOS Recovery
as per > Use Disk Utility to erase an Intel-based Mac - Apple Support
If you plan on selling it or giving it away, trading it in or recycling it,
see > What to do before you sell, give away, or trade in your Mac - Apple Support
What year model is the Mac Mini?
see > Identify your Mac mini model - Apple Support
If it is running High Sierra or later, startup in macOS Recovery
as per > Use Disk Utility to erase an Intel-based Mac - Apple Support
If you plan on selling it or giving it away, trading it in or recycling it,
see > What to do before you sell, give away, or trade in your Mac - Apple Support
How to reset an older Mac mini