Take the 2-minute tour ×

In addition to the .tex and .dvi or .pdf files, TeX/LaTeX/ConTeXt produces and uses lots of other files. What do they do? Which ones are used to create the document and which ones are automatically created by the compiler. What files can I safely delete?

share|improve this question

7 Answers 7

up vote 42 down vote accepted

.fd = Font definition; used in generating the output

.bst = BiBTeX Style File (e.g., a certain journal's preferred Bibliography layout settings); used by BibTeX when generating the bibliography

.aux = LaTeX auxiliary file; created when LaTeX is run, these contain information LaTeX records which is then either used by BibTeX or LaTeX itself on later runs (e.g., about cross-references), and can contain other things as well; this is created by running latex but also used the next time latex is run. It can be deleted, but then you may need to run multiple times in the future to regenerate it.

.bbl = Bibliography; this is what is outputted by BibTeX for insertion into LaTeX the next time LaTeX is run

.blg = Bibliography (BiBTeX) log -- just like .log but for BibTeX; generated by BibTeX and can be safely deleted if don't need to check it for errors

.brf = BackReference file for the backref package, I think. I'm not very familiar with these, but I suspect they're created by latex when a file using that package is compiled.

.cls = Documentclass (like article, or report - if you have them cluttering up your folders, you must use a lot of custom classes for individual journals or universities, etc.) This is obviously used to generate the output.

.dtx = Documented source file; can be used to generate a latex package or other file along with its associated documentation.

Of these, .aux and .blg can be safely deleted. Probably .bbl too if you don't mind rerunning BibTeX and have access to the .bib files needed. The rest shouldn't be deleted but maybe moved somewhere more appropriate. In particular .df, .cls and .dtx are better taking up space on a (personal) TeX tree, not in the folder of the document you're working on.

share|improve this answer
Thanks very much. Actually, I forgot another extension which is .lbl. Could you please edit your answer to tell me what it is? –  Promather Dec 26 '10 at 16:50
I'm afraid I don't know what a .lbl file is. Probably something specific to a package, like .brf, and the letters suggest something having to do with labels. What packages are you using for things like that? Almost all of these are plain text files, so you could open it and see what's inside. –  frabjous Dec 26 '10 at 17:19


Manually created

  • .bib: The data base file containing your bibliography entries.
    Created by you.
  • .bst: BibTeX style file.
    Determines how the bibliography looks (usually downloaded from somewhere).
  • .bbx: A biblatex bibliography style.
    Created by users.
  • .cbx: A biblatex cite style.
    Created by users.

Automatically created

  • .bbl: bibliography environment, generated by BibTeX.
    This is what the call to bibtex produces and what is included into your document by the \bibliography command.
  • .blg: bibtex and biber log file.
    Created by bibtex/biber.
  • .bcf: biblatex control file.
  • .run.xml: biber XML file.
  • -blx.bib: biblatex control file.
share|improve this answer


Manually created

  • .tex: The document itself
    Created by you.

Automatically created

  • .aux: An auxiliary file that saves information for the creation of ToC, references, indices, bibliographies and other things like that. It is reread in the next compiling to create the ToC, references etc.
    Created by (pdf/xe/lua)(la)tex

  • .toc: An auxiliary file that stores the Table of Contents, read in on subsequent runs to create the actual ToC.
    Created by (pdf)latex, xe(la)tex.

  • .lof: An auxiliary file that stores the List of Figures, read in on subsequent runs to create the actual LoF.

  • .lot: An auxiliary file that stores the List of Tables, read in on subsequent runs to create the actual LoT.

  • .log: Stors all messages of the compilation, like errors and warnings. It’s used by most Editors / LaTeX IDEs to show the errors in you document.

  • .pdf: The common output format for your document.
    Created by pdflatex, xelatex, ps2pdf, dvipdf.

share|improve this answer

General Layout and Package files

Manually created

  • .cls: Class files containing settings for you document and providing the basic macros for the mark up, e.g \section.
    Created by users or latex with an ins file.

  • .def: Collection of a list of similar definitions, that would make a sty file long and unreadable. See What does the .def file do?, and When to use ".sty" extension and when to use ".def".

  • .dtx: Source file containing template files, like classes and styles and their documentation.
    Created by users.

  • .ins: installation file to extract template files out of a dtx file. Created by users.

  • .sty: Style file containing macro definitions and other extensions for your document. Created by users or latex with an ins file.

Automatically created

share|improve this answer
These are not templates! –  Joseph Wright May 14 '12 at 7:00
@JosephWright: Maybe it’s the wrong word, I’m no native speaker. Pleas change it if you find a better title :-) –  Tobi May 14 '12 at 7:27

beamer special files

In addition to the standard .aux, .log, and .toc files, a beamer document will also create the following auxiliary files:

  • .nav: contains the information needed for the navigation bar hyperlinks.

  • .vrb: will contain the verbatim material when fragile (containing verbatim material) frames.

  • .snm: will contain information that will be used by \pgfimage to include actual slides when using the beamerarticle package.

  • .out: contains information about the sectional units that will be used to write the outlines.

share|improve this answer

I think you don't need to worry about files other than *.tex, *.cls and *.sty.

  1. *.tex is the extension for input files in which you put your document content and format. You can have more than one input file for your project. But only one input file can contain \documentclass call. The input file contains \documentclass call is called as your main input file.

  2. *.cls is the extension for documentclass containing layout settings and commands. There are many documentclass, such as article, book, minimal, report, etc. From within your main input file, you call this document class using the command \documentclass{book}, for example. Calling \documentclass{book} means you want to create a book project. In book project, you will have some settings such as chapter, section, subsection, subsubsection, frontmatter, mainmatter, backmatter, etc. Other documentclass also has different settings.

  3. *.sty is the extension for package containing class-agnostic commands. There are many packages. Each provides different purposes and works indendepently. For example, if you want to draw Euclid diagram for your project, you can use pst-eucl.sty. From within your main input file, you call this package by using \usepackage{pst-eucl}.

As the rule of thumbs: You may accidently lose files other than your input files, image files, data files. If you lost *.cls and *.sty, download again from the internet. If you lost *.aux, just compile again your input file.

share|improve this answer
I don't understand why someone wouldn't need to worry about .bst or .fd files, etc. Deleting those could definitely cause problems. –  frabjous Dec 26 '10 at 15:58
@frabjous. I don't say the other files are not important. :-) –  xport Dec 26 '10 at 16:02
@frabjous: I would read "don't worry about them" as "leave them be: don't try to understand what's going on with them, for now, just treat them as part of the magic of TeX", certainly not as "they're not important; you may as well delete them"! –  Peter LeFanu Lumsdaine Dec 26 '10 at 21:04
Fair enough! Just so long as it is clear, which it wasn't to me, and may not have been to others. (It is now, thank!.) –  frabjous Dec 26 '10 at 22:06

Your Answer


