2

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)
  • "some Debian tool to make free space". What tool was that? – Faheem Mitha May 6 '16 at 15:22
  • localepurge probably... – Stephen Kitt May 6 '16 at 15:24
  • @FaheemMitha: It was the standard Debian tool for disk space usage analysis. I think it's Baobab – Pierre B May 6 '16 at 15:26
  • @StephenKitt: is there a localeUNpurge? – Pierre B May 6 '16 at 15:27
  • @PierreB no, but see my updated answer. – Stephen Kitt May 6 '16 at 15:37
3

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)
  • 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. – Faheem Mitha May 6 '16 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. – Stephen Kitt May 6 '16 at 16:06
  • The approach you mention makes localpurge obsolete though, right? – Faheem Mitha May 6 '16 at 16:07
  • @Faheem, yes, it does (and it's better since it doesn't involve installing files then deleting them). – Stephen Kitt May 6 '16 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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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