Apparently some users report persistent side effects even years after stopping the medication (post-finasteride syndrome).
I've been taking it without significant side effects for ~15 years, so I'm not worried, although at this point it's losing its main effect as well.