6

Currently the .hgcache folder used up 30GB of my disk space. I am using a MAC book with only 256GB Disk, and Xcode on the other hand regularly eat up all the disk, just wondering is there any way to free up some disk space from the .hgcache folder.

questionto42
  • 7,175
  • 4
  • 57
  • 90
Jacky Yuan
  • 215
  • 3
  • 6
  • 1
    Okay, I have to be honest, I don't know – or can't even imagine – how you managed to get to a 30 GB `.hg/cache` directory. Which file(s) in there is/are so large? – Reimer Behrends Mar 03 '16 at 21:39

1 Answers1

4

From the official documentation on caching:

We have a few on-disk caches, which are stored in .hg/cache. These include the branch cache and the tag cache. Notably, these caches are designed to be 'pure', in the sense that Mercurial can operate without them. If Mercurial is unable to read or write them for some reason, it will continue to operate but more slowly.

Normally, it's easy to spot which files in .hg/cache are related to branches and which to tags. (If you see "rbc" that refers to "revbranchcache".)

If you have files or directories in .hg/cache that are not related to branches or caches, then it would probably be a good idea to be careful about deleting them.

peak
  • 105,803
  • 17
  • 152
  • 177