Moth flies, often called drain flies, are small, about 1/8 inch in length and often dark-colored. They are typically found on walls and do not fly well. They do not bite or do damage, but could carry bacteria from the organic material they develop in, usually in drain or sewage lines.
The best method of managing these flies is dealing with their breeding sites. In homes this is most often in bathroom drains. Physically removing the moist sludge or slime that lines the drain pipes should stop the problem at its source. Pouring boiling water and/or bleach down a drain may offer minor relief but will not fully remove the sludge. A hard bristled brush along with drain cleaner should be used to clean the lining of the pipes. Ideally the J trap under the sink should be cleaned as well. Regular applications of enzyme cleaners can help prevent future problems from developing.
The use of pesticides is unnecessary for moth fly management because only the removal/cleaning of the breeding sites will ultimately solve the problem.