Hi Joe. I love your question! The simple answer is - No. Bacteria are organisms made up of just one cell and therefore do not have a digestive system like animals that are made of millions of cells. They do absorb nutrients (at a molecular level) which they breakdown to produce energy they need to grow. As they take in molecules they do also excrete the ones (most are by-products of their metabolism) that they do not need to live. The excreted substances can also be solids, liquids or gases and can be useful, e.g. oxygen, nitrates and water, or toxic, e.g. ammonia.
Although bacteria do not fart, when humans fart the majority of gas is odourless - just chemicals that make up the air around us; nitrogen, carbon dioxide, oxygen, hydogen and sometimes methane. However, the smelly gas we produce when we fart is caused by sulphur containing substances excreted by the bacteria that live in our large intestines.