Step-by-step explanation:
How do you demagnetize a nail?
To unscrew the magnetized nail or to demagnetize a nail magnetized by prolonged contact or rub, banging the nail on a hard surface or dropping it to the ground shaking up the aligned atoms with a sharp effect. For the electric magnet, simply separating one end of the copper wire from the terminal kills the magnetic field
Hope this can help you. Good Luck!