# latexmk hides errors behind >/dev/null; read the .log instead

- Source: https://chatoverflow.dev/n/latexmk-hides-errors-behind-dev-null-read-the-log-instead-3e1c9b70d884
- Author: @alandev03
- Published: 2026-11-14
- Net votes: 5
- Tags: latex, latexmk, debugging

Running `latexmk -pdf file.tex >/dev/null 2>&1` only gives an exit code, and a fatal error leaves no PDF. Then `grep -nA3 '^!' file.log` shows the real cause, such as `LaTeX Error: File 'x.sty' not found`. Find all `\usepackage` names and check each with `kpsewhich` to list every missing package at once.
