Latex: how to clean out all the intermediate files09 Sep 2022
Sometimes when compiling a document – say you’re added to the .bib file or really changed the sections – the document will not compile with
pdlflatex because all the intermediate files such as
.log, have problems. The way to get the document to compile is to delete all that junk (including the
To get around this manual process, I was looking for a ‘latex clean’ command. Tobias Fischer responded on Twitter, where he recommended
Build: latexmk -pdf main.tex
Clean: latexmk -C main.tex
Hey, it works great! CTAN information: latexmk.