There are no specific rules to remove a rakhi and there’s also no mention of the same in any ancient scriptures. Brothers can wear a rakhi for as long as they like and then remove the rakhi whenever they wish.
In Maharashtra, many brothers can remove rakhis on the fifteenth day from the day of Raksha Bandhan on the Pola festival which observes farmers worshipping God Marbot Dev and bullocks. People leave their Rakhi in the feet of the God and seek his blessings.
Many people also remove rakhis after the eighth day of the Raksha Bandhan on the festival of Krishna Janmashtami.