Given a squarefree monomial ideal I of a polynomial ring Q, we show that if the minimal free resolution \(\mathbb {F}\) of Q/I admits the structure of a differential graded (dg) algebra, then so does any “pruning” of \(\mathbb {F}\) . In the language of combinatorics, this says that if \(Q/\mathcal {F}(\Delta )\) , the quotient of the ambient polynomial ring by the facet ideal \(\mathcal {F}(\Delta )\) of a simplicial complex \(\Delta \) , is minimally resolved by a dg algebra, then so is the quotient by the facet ideal of each facet-induced subcomplex of \(\Delta \) (over the smaller polynomial ring). Along with techniques from discrete Morse theory and homological algebra, this allows us to give complete classifications of the trees and cycles G with Q/I(G) minimally resolved by a dg algebra in terms of the length of the longest path in G, where I(G) is the edge ideal of G.