Antifibrotics are most often used to treat idiopathic pulmonary fibrosis (IPF). Antifibrotics are thought to work by slowing down the formation of scar tissue in your organs, which helps to improve lung function and quality of life. These medications come in different forms, including oral tablets and capsules. An example is pirfenidone (Esbriet).