# Restore biblatex installation

I messed up my `biblatex` installation by attempting to manually upgrade it. Right now, basic commands like `\textcite` cause an `Undefined control sequence` error.

As a user of Ubuntu 16.04, TeX Life was either preinstalled or I installed it with `apt` some time ago. Now, I wanted to upgrade `biblatex` (to use a feature introduced in version 3.3), and thus downloaded version 3.7 from sourceforge. Following the instructions in the README, I used the `.tds.tgz` archive and placed the under `texmf` tree.

While writing this post, I realise that I put the files in the wrong place: I put them into `/usr/share/texlive/texmf/`, while the instructions say `/usr/share/texmf-local/` (which doesn't exist) or `/usr/local/share/texmf/` (which is empty but for the single file `ls-R`). So, I probably should have used one of the local ones, creating missing intermediate directories (would that have worked while keeping TeX Live as it is?).

What is the best way to recover from this situation? Should I remove all of TeX Live through the package manager and reinstall it? Or can I manually undo the replacements using some TeX Live repository?

• I would at first remove all auxiliary files and recompile. One always get tons of error when switching biblatex versions. Btw: You will need also a new biber. Aug 7, 2017 at 10:52
• Since Ubuntu 16.04 ships with TeX live 2015 it could be that there are version incompatibilities with other packages when trying to install `biblatex` 3.7/Biber 2.7. You will always need matching versions of `biblatex` and Biber. If you want an up-to-date system you could look at installing vanilla TeX live (see here). But before you do anything else, try what Ulrike suggested, maybe you are lucky and it is indeed only the temporary files that cause trouble here. Aug 7, 2017 at 11:06
• For manual installs see also How can I manually install a LaTeX package (Debian/Ubuntu Linux)? and How do I install an individual package on a Linux system? But note that I would never recommend installing packages manually or even updating them manually. If you have an old TeX live either live with the fact that you are not at the cutting edge of development or get a current TeX live (on Debian that often means not installing the apt version). Aug 7, 2017 at 11:08
• @UlrikeFischer Thanks, I had updated `biber` to version 2.7 (it seemed to have worked) and I had recompiled from scratch. I left that all out to keep the post focused.
– lenz
Aug 7, 2017 at 11:32
• @moewe Thanks, that sounds reasonable. By getting a current TeX Live, do you mean the vanilla one (is only the installation process "vanilla", or is it a light-weight version or something)?
– lenz
Aug 7, 2017 at 11:35

If you have overwritten files that were installed via `apt` on your system, you can try to re-install the relevant package via `apt`, so `apt-get install --reinstall` or `aptitude reinstall` seem like good candidates. `biblatex` should live in `texlive-bibtex-extra`, so that is the package you need to restore.
It is always risky to manually install `biblatex` or other packages, because there might be dependencies and version incompatibilities. Normally packages should be installed only via your distribution's facilities. While it may be possible to install small packages with little dependencies (and dependencies only on very stable packages, or stable parts of packages) manually, for larger packages such as `biblatex` things are more likely to go wrong. `biblatex`, for starters, needs the correct Biber version. All contributed `biblatex` styles need to be kept in sync with `biblatex`. And then `biblatex` depends at least on recent features of `babel`, `polyglossia` (if loaded) and `xstring`.
If you want to have a current TeX live system you should look into installing a "vanilla" TeX live directly from TUG and not via your Linux distribution. The TeX live shipped by Linux distributions is often quite stable, and that often means also slightly outdated. "Vanilla" TeX live installations allow you to use `tlmgr` to install and update packages.