[Tex/LaTex] Get list of unused labels

cross-referencing

I have a long article (~20 pages) with lots of equations being numbered and stuff. For a good cleanup, I would like to unnumber the unused equations. I am aware I can hide the unused numbers, but I would like to clean the thing up and not rely to the feature of mathtools. Therefore, is it possible to somehow display the list of unused labels?

On the following MWE, it should show (in the log, in bash, whatever) that boo was unused:

\documentclass{article}
\begin{document}
\section{BLA}\label{bla}
\section{BOO}\label{boo}
In Section~\ref{bla}.
\end{document}

Best Answer

Use the refcheck package:

enter image description here

\documentclass{article}
\usepackage{refcheck}
\begin{document}
\section{BLA}\label{bla}
\section{BOO}\label{boo}
In Section~\ref{bla}.
\end{document}

Unused \labels are also marked in the .log. The above MWE outputs

Package refcheck Warning: Unused label `boo' on input line 5.

in the .log. The visual queues in the output can be turned on/off using the [norefs] option. It would also work for \cites (with the accompanying showcites/nocites boolean package option).