Magnets lose magnetisation over time, and this rate of loss increases with improper handling, high temperature, physical force and chipped coatings. Older magnets generally lose their magnetisation and strength of attraction. When magnets refuse to "stick" anymore, though, don't throw them away. With a strong neodymium (NdFeB, or neodymium, iron, and boron) magnet, you can easily reverse the loss and energise those batteries. After a magnetic treatment, those old magnets will back to attracting metals.
Stack an even number of neodymium, or NdFeB, magnets in a column.
Place a string running perpendicular through the two middle magnets so the magnets freely hang. The magnets will, after a short time, orient themselves north and south. North (once called "north-seeking") will be pointing north.
Rub, stroke or leave the north side of the NdFeB magnet connected to one side of the old magnet. This creates an opposite attracting force in the magnet. Repeat with the other side by using the south side of the NdFeB magnet to establish a true magnetic force in the magnet.
Utilise care with strong neodymium magnets. If they collide with magnets, they can become damaged.
Never leave magnets unattended around children. Magnets can be dangerous if swallowed. Strong magnets can bruise or break smaller bones if fingers are caught between two attracting poles.