I accidentally switched on developer mode by pressing build number option in android 5.0 phone. how to disable that. I don't want developer option in my phone
Once enabled, I don't know that it can be disabled, although factory resetting may do it. But though enabled, you can leave Developer Options switched off.
In some phones you can disable them clearing data in settings - apps - all - settings. This will delete any personal changes you made in your settings. If that's not possible in your phone, as Belodion said, a factory reset is your only option. A lot of hassle for such a small thing.