Surgery is also a treatment option in the for a nail fungus, however, in my opinion it should primarily be utilized as a last resort. This treatment method involves surgically removing the entire affected nail and thereby removing the fungus.
A topical anti-fungal lacquer is often used after the nail is removed to prevent regrowth as a new nail is generated. The nail then grows back afresh without the infection. The surgery is usually conducted by a qualified doctor who can effectively remove the nail without causing damages to the surrounding skin. It often takes a year or more for the nail to grow back fully.