If you're noticing fruit flies in your bathroom, there are a few things you can do to get rid of them. First, try to identify where they're coming from. Check to see if there are any rotting fruits or vegetables in your garbage can or under your sink. If so, dispose of them immediately. You might also want to clean out your drains, since fruit flies can lay their eggs in organic matter that's accumulated there.
Once you've removed any potential sources of food for the fruit flies, you'll need to take measures to keep them out. Start by sealing up any cracks or openings around doors and windows. Then, set out traps using vinegar or soap and water. Finally, make sure to keep your bathroom clean and free of food debris so that the fruit flies don't have anything to eat if they do manage to get inside.