Where Does LaTeX Workshop Put Build Files?
LaTeX Workshop writes PDFs and auxiliary files beside your .tex by default, movable with latex.outDir and latex.auxDir in VS Code settings.
Last updated
LaTeX Workshop defaults to building right next to your source file, so first-time users find a dozen new files beside manuscript.tex. The PDF lands in the same folder, along with auxiliary files (.aux, .log, .synctex.gz) that LaTeX needs between passes. It looks like clutter, but most of it is load-bearing until the build finishes.
Two VS Code settings tame the mess: latex.outDir redirects output and latex.auxDir splits auxiliaries away from the PDF. Both default to the document folder (%DIR%), so nothing moves until you say so.
Where LaTeX Workshop stores this, by platform
%APPDATA%\Code\User\settings.json
Output and aux settings live in the latex-workshop section here. Set latex.outDir to ./out to redirect PDFs, and latex.auxDir to separate .aux and .log files from the finished document.
~/Library/Application Support/Code/User/settings.json
Same extension settings as other platforms. Default builds still drop .aux, .log, and .pdf beside the .tex file; only outDir and auxDir change that. The Clean command removes the regenerable files.
~/.config/Code/User/settings.json
Same settings file role under the XDG path. latex.outDir accepts placeholders like %DIR%; use an explicit folder (./out) rather than compiler -outdir flags so the PDF viewer can find the result.
Frequently asked questions
How do I stop .aux and .log files cluttering my project?
Set latex-workshop.latex.outDir (for example ./out) and latex-workshop.latex.auxDir in VS Code settings. The PDF viewer follows outDir, but only when the setting names the folder explicitly rather than relying on compiler flags.
Which build files can I delete safely?
Run the Clean command from the extension (or delete by glob). Safe targets are .aux, .log, .out, .toc, .synctex.gz, .fls, and .fdb_latexmk. Keep the .tex, .bib, images, and the final PDF.
Notice an outdated path? Let us know.