How to find unused or old twig template files? There are times when fields are deleted from a Content type, but there is no way of knowing if there is a related field twig template without manually looking in our repository. 

Other than looking for file names, are there any utilities or other methods to find twig templates that are not being used?
It's difficult to find a deterministic method, so you probably need some kind of usage statistics.

A simple statistical method would be to clear the twig php cache:

\Drupal\Core\PhpStorage\PhpStorageFactory::get('twig')-&gt;deleteAll();


Then run the site for some time and check the twig php cache (/sites/default/files/php/twig) for twig files not having a compiled php template.