Tuesday, April 27, 2010

Cache ≠ Can Throw Away Safely

As tempting as it is to remove /var/cache/ or to shift it to tmpfs, never do it because ``cache'' doesn't equate to ``can throw away safely''.

Case in point: hal balks when it cannot find /var/cache/hald/, and apt cries when it cannot find /var/cache/apt/archives/ and /var/cache/apt/archives/partial/, and dpkg might scream when it misses /var/cache/debconf/. All these lead to a non-working machine.

3 comments:

roticv said...

At least you didn't try to remove python...

Mo said...

Is this from experience?

The_Laptop said...

Unfortunately, it is from personal experience. Thankfully, I managed to rebuild the directory structure. Took me quite a few reboots to do this.

On another issue that occurred, I've learnt to use dpkg --remove to force remove a half-configured kernel. That alone was not fun at all.