Castration* is done by cutting the penipeni off at the base--spread some flour dissolved in orange juice on the wound, and you're done. However, if you don't sever it right at the base, the procedure will not be effective (this method only prevents mammalian pregnancies). By the way, this illustration shows an ineffective operation. Also, if she is not anesthetized during the procedure, you will do severe damage to your yukkuri. In particular, Reimu-types, who are said to have a strong mothering instinct, may suffer a breakdown, so please, always use an anesthetic during castration*.
*Castration: Or, sterilization, since it seems like this procedure also might eliminate the mamumamu. I keep going back and forth between the two terms. Sterilization sounds more like you're wiping her down with a cotton ball and peroxide than cutting off her penipeni, though.