So, I just screwed up a timezone file on my Debian system because I pointed it as a link to /etc/localtime vs. pointing /etc/localtime to it. Specifically, /usr/share/zoneinfo/America/Puerto_Rico.

I'm obviously way too deep to reinstall the server for the sake of one file. Where can I find and restore just this one file?

I'm using SMP Debian 4.9.144-3.1 (2019-02-19) x86_64.



The command you need is:

apt-get install --reinstall tzdata


To know which package contains the file you damaged, you could do a

dlocate -S /usr/share/zoneinfo/America/Puerto_Rico


dpkg-query -S /usr/share/zoneinfo/America/Puerto_Rico

which will tell you that the file is in the package tzdata.

Once you know that, it's just a matter of telling the package manager to reinstall that package.

|improve this answer|||||
  • You're a lifesaver! :D .. wish I knew more Linux – Codesmith Apr 15 '19 at 23:58

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