Latex: how to clean out all the intermediate files

latex publications

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 .aux, .log, have problems. The way to get the document to compile is to delete all that junk (including the .pdf!) and try again.

To get around this manual process, I was looking for a ‘latex clean’ command. Tobias Fischer responded on Twitter, where he recommended latexmk.

Build: latexmk -pdf main.tex

Clean: latexmk -C main.tex

Hey, it works great! CTAN information: latexmk.

© Amy Tabb 2018 - 2023. All rights reserved. The contents of this site reflect my personal perspectives and not those of any other entity.