If all the nuclear weapons on Earth were detonated, would it be possible to destroy the whole of humanity?

No. Fun nuclear weapons fact. If you detonated ALL the nuclear bombs EVER made (over 80,000 lifetime, about 12,000 left today), the energy released would not even compare…