2

I've accidentally deleted all contents of /var/cache files. I managed to reinstall most by doing dpkg -S /var/cache and apt-get --reinstall install PACKAGE_NAME (see here) on every package that I've found.

I still have some missing files into some directories. I re-created them but after rebooting, the problem was still here. Those are the packages with some files missing:

  • bind
  • dictionaries-common
  • fontconfig
  • ldconfig

Any ideas on how to force them to regenerate their files?

John WH Smith
  • 15,500
  • 6
  • 51
  • 62
  • 1
    Actually the [definition of `/var/cache` in the file hierachy standard](https://www.debian.org/doc/packaging-manuals/fhs/fhs-2.3.html#VARCACHEAPPLICATIONCACHEDATA) is that way that it shouldn't hurt if you delete any file under `/var/cache`. – Axel Beckert Dec 09 '14 at 23:22
  • So i should not worry about it? Thanks. – Mario Villani Dec 10 '14 at 18:59
  • 1
    Nope. At least I wouldn't. :-) And if I'd find something which breaks due to an empty `/var/cache`, I'd write a bug report. ;-) (Actually `apt` had such a bug until a few years ago. It refused to work, if the directory `/var/cache/apt/archives/partial/` didn't exist. But that's history.) – Axel Beckert Dec 10 '14 at 22:29
  • that's not what the accepted answer here says: http://unix.stackexchange.com/questions/23156/can-i-safely-remove-var-cache – Paul Jan 13 '17 at 23:52

0 Answers0