3

I run debsums -cs in a machine running Debian Jessie. The output is lots of missing files.

Lots of them (maybe all) has some sort of locale two letters code (like zh, fr, de, and so on).

I have run BleachBit and some Debian tool to make free space some days ago and I suppose this caused the problem.

How should I deal with this? Is suppressing the output possible? Could I re-install locales?

Sample output:

debsums: missing file /usr/share/man/fr/man8/adduser.8.gz (from adduser package) debsums: missing file /usr/share/man/fr/man8/deluser.8.gz (from adduser package) debsums: missing file /usr/share/man/fr/man5/deluser.conf.5.gz (from adduser package) debsums: missing file /usr/share/man/fr/man5/adduser.conf.5.gz (from adduser package) debsums: missing file /usr/share/locale/es/LC_MESSAGES/adduser.mo (from adduser package) debsums: missing file /usr/share/locale/zh_CN/LC_MESSAGES/adduser.mo (from adduser package) debsums: missing file /usr/share/locale/nl/LC_MESSAGES/adduser.mo (from adduser package) debsums: missing file /usr/share/locale/cs/LC_MESSAGES/adduser.mo (from adduser package) debsums: missing file /usr/share/locale/de/LC_MESSAGES/adduser.mo (from adduser package) debsums: missing file /usr/share/locale/pl/LC_MESSAGES/adduser.mo (from adduser package) debsums: missing file /usr/share/locale/pt/LC_MESSAGES/adduser.mo (from adduser package) debsums: missing file /usr/share/locale/nb/LC_MESSAGES/adduser.mo (from adduser package) debsums: missing file /usr/share/locale/ru/LC_MESSAGES/adduser.mo (from adduser package) debsums: missing file /usr/share/locale/da/LC_MESSAGES/adduser.mo (from adduser package) 
5
  • "some Debian tool to make free space". What tool was that? Commented May 6, 2016 at 15:22
  • localepurge probably... Commented May 6, 2016 at 15:24
  • @FaheemMitha: It was the standard Debian tool for disk space usage analysis. I think it's Baobab Commented May 6, 2016 at 15:26
  • @StephenKitt: is there a localeUNpurge? Commented May 6, 2016 at 15:27
  • @PierreB no, but see my updated answer. Commented May 6, 2016 at 15:37

2 Answers 2

4

If you want to remove files for locales which don't interest you (or anything else for that matter), you should tell dpkg about it: that way not only will debsums stop complaining about them, but dpkg won't even install them in the first place.

Here's what I have, in /etc/dpkg/dpkg.cfg.d/locales:

# Drop locales except English and French path-exclude=/usr/share/locale/* path-include=/usr/share/locale/en/* path-include=/usr/share/locale/fr/* path-include=/usr/share/locale/locale.alias # Drop translated manpages except English and French path-exclude=/usr/share/man/* path-include=/usr/share/man/man[1-9]/* path-include=/usr/share/man/en*/* path-include=/usr/share/man/fr*/* 

If you adapt this to your setup you should find debsums produces much more useful output.

Raphael Hertzog wrote a blog post about this with a little more detail.

If instead you want to restore the missing files, you need to re-install the affected packages:

apt-get --reinstall install $(debsums -c 2>&1 | grep -E -o 'from [^ ]* package' | cut -d\ -f2 | sort -u) 
4
  • Stephen, I used to have localepurge installed, but right now I don't. I must have lost it when I did a fresh upgrade. I don't want to reinstall it to test. So, my question is, is this output for debsums normal if localepurge is used? And thanks for the dpkg config tips, it looks useful. Commented May 6, 2016 at 15:44
  • @Faheem, it depends on how localepurge is set up; but if it's still installed and configured, debsums is supposed to take it into account. If Baobab was used instead, the output in the question makes sense. Commented May 6, 2016 at 16:06
  • The approach you mention makes localpurge obsolete though, right? Commented May 6, 2016 at 16:07
  • @Faheem, yes, it does (and it's better since it doesn't involve installing files then deleting them). Commented May 6, 2016 at 16:27
0

You need to reinstall the packages for the missing files. The way to do so is to retrieve packages names of missing files using dpkg -S, then reinstall them with apt-get:

debsums -cs | grep -E ^debsums | awk '{print $4}' | xargs -rd '\n' -- dpkg -S | cut -d: -f1 | sort -u | xargs -rd '\n' -- apt-get install --reinstall 

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.