Actually according to the Ontario Science Center whether or not fish fart, is an ongoing debate. Some experts (seriously..these are really expert in fish farting) say that the digestive gasses of fish are consolidated with their food waste and expelled in gelatinous tubes which fish then eat. But, fish have been known to emit bubbles due to an excess intake of air. For instance the sand tiger shark purposefully gulps air into its stomach at the surface then farts it out at the other end so it sinks to its desired depth.
I personally think that fish fart because I have seen my marble goby do it. I think this because when he goes up for air and that they take in too much air and then they exert it out of their rear end. All living things produce gas,which is expelled. Some from the rear, some from other places. You can see tiny air bubbles from the anus and the poop also.
A friend of mine had an Arowana. Whenever there was a large change in air pressure (storm approaching) it would be very active, swimming up and down the tank day or night, and it did seem to be in some distress. Then he would produce a couple of bubbles. Then after that he'd be back to it's normal self. A kind of indigestion I guess. Whoops!
My friend Tammy also thinks that fish do fart, but then again Tammy is a bit funny like that! Yes, fish farts. In fact, it is said that every second of everyday somewhere on Earth, a fish is farting. The term applied to the act of a fish farting is "QUIEF"..and boy do they smell fishy! But it gets weirder; herring actually use farts to communicate with each other. ROFL!