Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am searching for a particular LaTeX input file, and have not been able to find it in the repositories.

I am fairly certain that the repositories can be searched by contents because the following command (searching for the LaTeX input file amsmath.sty) is successful:

# apt-cache search amsmath
texlive-latex-base - TeX Live: Basic LaTeX packages
texlive-doc-it - TeX Live: Italian documentation
texlive-latex-extra - TeX Live: LaTeX supplementary packages
texlive-math-extra - TeX Live: Advanced math typesetting

The particular TeX input file I am searching for returns no results (apt-cache search breqn). Can I assume that breqn.sty is not present in any packages in the repositories, and thus seek it out through other means (e.g., CTAN)? Or might there be another way to search through package contents?

share|improve this question
up vote 8 down vote accepted

You can use apt-file to search for files within packages

sudo apt-get install apt-file

# Update database
sudo apt-file update

# Search for files
apt-file search foo

# or in your case
apt-file search breqn.sty

I get texlive-latex3: /usr/share/texmf-texlive/tex/latex/mh/breqn.sty , so ...

sudo apt-get install texlive-latex3

See also

share|improve this answer
Thanks for mentioning apt-file update. I had thought that apt-get update would have applied to apt-file as well, but this turned out not to be the case. – user001 Feb 1 '12 at 4:53

You're looking for texlive-latex3. I found this out by installing apt-file Install apt-file and using it like so:

apt-file update
apt-file search breqn.sty
texlive-latex3: /usr/share/texmf-texlive/tex/latex/mh/breqn.sty

Which gives me the package name and the file.

share|improve this answer
@user001 This is a site about Ubuntu not debian, you need to ask your question on if it's about Debian. – Jorge Castro Feb 1 '12 at 4:54
Actually, nevermind, it worked. I needed to run apt-file update as @bodhi-zazen pointed out. I thought apt-get update would be sufficient, but I guess they maintain separate package caches. I knew in this case the results would be equally useful to ubuntu and debian users, so that's why I posted it. I use both. – user001 Feb 1 '12 at 4:57
@user001 When I installed it on mine it prompted me to update it automatically, I've updated my answer to be sure though. – Jorge Castro Feb 1 '12 at 4:58
Thanks. It turned out I already had apt-file installed on my system without realizing it, so that's why I wasn't prompted. I probably hadn't run apt-file update in a while. – user001 Feb 1 '12 at 5:00

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.