«

»

Update: Moving the Default Chrome Cache Directory

squirrel-cache-image

Why move the Chrome Cache Directory?

My personal reason for moving the Chrome cache directory is because my main hard drive is a rather dinky 80GB Solid State Drive (SSD). Having tens or hundreds of megabytes being written all the time to the SSD is something I wanted to avoid. Not only does that take up valuable space but makes for a lot of write operations on the drive.

For the curious, there might be a slight performance lag by putting the cache on a regular mechanical hard drive (a spinner), but for the life of me I don’t notice it one little bit.

Your reasons for wanting to move the cache directory may vary wildly. A good reason to keep it off your main Windows drive involves backups. You are making regular backups, aren’t you? The point is, there is no point in backing up these cache files. They take up room and make your backups take that much longer. Maybe you’d like to move the cache directory to a RAM drive for some lightening fast response. Another advantage might be to have those files deleted when you shut your computer off.

I’m sure you can come up with many reasons not mentioned here.

Important!

A while back I wrote a short article on how to move the Google Chrome browser’s default cache directory. That involved Method 1 below.

Method 1

That method involved adding ‘switches’ or command-line parameters to the Chrome shortcut settings. That worked well for me at the time, but something recently happened that is the impetus for this update.

I recently re-installed Windows on my computer. It is something I generally do roughly once a year or whenever I feel like the computer just isn’t running as good as it should.

This time, for whatever reason that I have not been able to fathom, that method is simply not working for me. Maybe it has something to do with a new Chrome version? I really have no idea what happened.

Method 2

Here is another way to change the default location of the Chrome cache directory. It takes a little more effort but I know it works for sure. Using this method Chrome started behaving right away. No re-boot, no muss, no fuss.

Step 1

The first thing you want to do is make sure no instances of Google Chrome are running in the background. Here’s how to do that:

Open the Task Manager

As with all versions of Windows there are several different ways to achieve the same result- no exception here.

  • Right-click on the Task Bar and choose Task Manager, or
  • Hold the <CTRL>+<SHIFT> keys and tap the <ESC> key

task-manager-image-001

Once you have Task Manager open click on the Processes tab. In this image on my computer you will see that I have 6, count them, 6 instances of Chrome running. This does not mean that I have opened Chrome 6 times; it is merely the way Chrome runs itself.

If you have closed your Chrome browser then you don’t want to see any instances of Chrome listed here. If you do, click on each one and hit the End Process button in the bottom-right corner. Continue this until there are no instances of Chrome in the list. I’ll wait…

impatient_kitty

Step 2

This is where we perform the magic. It may seem a daunting procedure for those of you who are not familiar with the Command Box and/or typing cryptic-looking command lines. Never fear! It really isn’t as complicated as it may look at first glance.

First things first

The default Chrome cache location is on your Windows drive. This is how the typical path looks:

Important!

C:\Users\<user name>\AppData\Local\Google\Chrome\User Data\Default\Cache\

Open your favorite file manager and follow this path by starting with the “C:\” drive, then click on Users, then Your User Name (mine is Richard; it will be the name of the account you chose when you installed Windows). Keep expanding directories. Eventually you should find yourself at the Chrome Cache Directory. It may look similar to this:

dir-listing-image

Your listing will most probably look different. It is unlikely that we have both installed the same programs on our respective machines. The reason my Cache directory has that little shortcut arrow on it is because of what I’m about to tell you. You’ll soon have that cute little arrow, too.

Warning!

Did you make backups? If not, do so now.

Step 3

  • Right-click and rename the Cache Directory to something that makes sense to you (Cache.old, for instance?)
  • Open a Command Box with Administrator privileges: Hit the Windows Logo Key+ R
  • Type cmd and hit <RETURN>; this should open the Command Box

Note: You must have Admin Privileges for this to work. Look in the Title Bar and you will see the word “Administrator” if you do. Like in this image:

admin-cmd-box-image

The Magic

For the purposes of this discussion I will presume you want to create your new cache directory at E:\ cache. You will have to replace that information in the following command line with the actual destination that applies to you.

Basically what we are going to do is tell Windows to create a link at a <source> location and have it point to a <destination> location. It looks like this: mklink /d “<source” “<destination”

For our purposes the source and destination will look like this:

  • Source: C:\Users\<user name>\AppData\Local\Google\Chrome\User Data\Default\Cache\
  • Destination: E:\cache

Remember, you will have to change the paths to apply to your specific computer.

That’s pretty easy to understand. Let’s get into it.

At the prompt you will need to type the following:

mklink /d “C:\Users\<user name>\AppData\Local\Google\Chrome\User Data\Default\Cache\” “E:\cache”

The Devil is in the Details

There are a few things to which you must pay close attention:

  • Spaces – the computer considers spaces the same as it does visible characters. Do not ignore them. The computer doesn’t
  • Backslash – you will notice a backslash after the Source part of the command line, but not after the Destination part
  • Quotes – these separate the two parts of the command; that is how the computer knows where the Source and Destination begin and end

All of the above are important. One seemingly insignificant error and it won’t work. Period. If you are successful, you won’t get an error message. If you do get an error, just enter it all again and pay closer attention.

Important!

Tip #1: Hitting the F3 key will enter the last command you typed into the box

Tip #2: The ‘/d‘ switch tells the computer you want to link a Directory. For a list of the mklink switches type: mklink /?

Testing

Once you have successfully completed the above task you should have a new directory in the old location on your C:\ drive. This time, though, it will have that pretty shortcut arrow that we have been working so hard to create.

This indicates that this directory is merely a pointer to the directory you created on another drive. It’s a shortcut, or link, just like the shortcuts on your desktop are not the programs themselves. They’re just pointers to those programs.

To test that everything is working as you expect all you have to do is open up your new Chrome Cache Directory in your favorite file manager. While you keep an eye on that, fire up Google chrome. If all is well you start seeing your new cache filling up with temporary cache files generated by Chrome.

Success and Clean Up

When you are satisfied that all is well, you can delete that old cache directory from your system drive. Remember the one you renamed earlier (like cache.old)?

If you have gotten through this long-winded explanation, then I commend you and your determination. I also congratulate you for taking control of your Windows computer and making your file system a better-behaved beast.

If you have any questions specific to this article, hurdles you can’t seem to overcome, or suggestions to help others please don’t hesitate to leave a comment below.

---

Enjoy this article?



About the author

Richard

~"addicted to computers since 1982"~
I got my first computer in 1982 and haven't looked back.
I love to find ways to improve their efficiency and to help others do the same.
I build and repair personal computer systems.
I live in a small farming community in Western Wisconsin.

Permanent link to this article: http://www.wincom7.com/update-moving-chromes-default-cache-directory/

54 comments

Skip to comment form

  1. Jeebles

    Im trying to do this but whenever I enter in the command in cmd it says “Cannot create a file when that file already exists.” I am using Windows 8.

    1. Richard

       

      Hi Jeebles!

      First off, thank you for your comment.

      It is necessary to rename the original directory to something else first. Like <original directory name>.old

      If you don't do this Windows will not create a link because it sees it as a duplicate and that is not allowed.

      Also, I have not tested any of this in Windows 8 so I can't offer any guarantees in that area.

      Just rename that directory first and you should be OK. Besides, it will serve as a backup should something go wrong.

      I Hope this helps,

      Richard

       

  2. Jeebles

    Yes that was it, thanks for the help.  Would work for any program that I want to relocate cache files right?

    1. Richard

      You can make links for any directories you like. I have all my games folders linked to another drive. That way all those saves aren’t stuck on the C drive taking up a lot of space. Yet another advantage is that I don’t have to figure out how to tell the software where to store its files. As far as it knows, nothing has changed.

      Glad it worked for you,

      Richard

       

       

  3. Dan

    Hello. I followed the guide and it appeared that everything worked. I didn’t get an error from the command, and I saw a shortcut symbol on the Cache folder in Default. But, when I started up chrome, the folder went back to normal and there is nothing on my RAM drive. It’s as if I didn’t do anything.

    1. Richard

      Hi Dan,

      I’m sorry you’re having trouble with this. I can only make a couple of guesses without actually seeing your directories.

      Guess #1: If your RAM Drive is not persistent between re-boots, that might be a problem. The link must point to a directory that exists. I don’t know which RAM Drive software you are using but if it does not offer you the choice of saving/loading itself upon a Windows re-boot you might consider getting one that does.

      I use DRDataRAM and it provides this functionality. You can check out my post about RAM Drives – What and what Not to use it for: http://www.wincom7.com/windows-7-installation/windows-7-system-installation-settings-tips-ram-disks-what-and-what-not-to-use-it-for-part-12/

      or you go directly to the DRDataRAM site to get the download: http://memory.dataram.com/products-and-services/software/ramdisk

      I know I said I had a couple of guesses but this is actually the only one that immediately comes to mind.

      If you continue to have problems with this please send more details.

      Richard

  4. Anonymous

    the command didn’t work for me until i used an upper case D in the command…

    1. Richard

      Thanks for the heads-up!

  5. Bbctwit

    Hi ya. I did Step 2 and it was working for a time. Problem is when Chrome auto-updates it overrides everything I did in Step 2, and Chrome is back to saving stuff into its default cache folder (C:\Users\me\AppData… etc). The cache folder I made in drive D is now empty.

    1. Richard

      Hello Bbctwit,

      I honestly don’t know why a Chrome update would affect your SymLink.

      All I can suggest is to carefully check the paths being used by Chrome and that your SymLink hasn’t broken somehow.

      You can always run through the process again if you find an error.

      I hope this helps,
      Richard

  6. Mirko

    I type mklink /d “C:\Users\Mirko\AppData\Local\Google\Chrome\User Data\Default\Cache\” “R:\cache” and always get “The syntax of the command is incorrect”. Please help

    1. Richard

      Hello Mirko,

      A previous reader wrote that he couldn’t get the command to work until he used a capital ‘D’ for the switch. Try that. I didn’t have that problem myself, though.

      I have looked over your command syntax and it looks perfect– at least nothing is jumping out at me.
      One more thought: Did you create the Cache folder on your destination drive before running this command? It needs to be there first.

      Let me know if you solve this and what you did. If you continue to have problems, let me know and maybe we can dig a bit deeper.

      Good luck,
      Richard

      1. Mirko

        Yes, I did previously all that you said, capital D etc., but always same problem

      2. Richard

        Hi Mirko.

        I will need an image of the following in order to settle this problem:

        An image of the original path
        An image of the destination path
        An image of the Command Box after you have typed in the command and showing the error message

        Thank you. We’ll get this thing licked,
        Richard

        If you can’t upload the images in a comment, then you may send them via eMail: webmaster(commercial at sign) wincom7.com

        (I don’t type in the actual eMail address to avoid SPAM Bots.)

    2. Haplo

      I know it’s late but whatever. I was having this prob. You need to use regular quote. ” ” not the curly quotes. When I copied from this site it used curly.

  7. Mirko

    OK, it is done, check your mailbox. Thanks

  8. Mirko

    I found this and was succesfull:

    mklink /J “C:\Users\Mirko\AppData\Local\Google\Chrome\User Data\Default\cache” “R:\Cache”

    http://www.neowin.net/forum/topic/1044311-easier-way-to-move-the-location-of-google-chrome-cache-user-profile/

  9. Mirko

    No \ after source cache

    1. Richard

      Hello Mirko.

      I thank you for your diligence. I’m glad you got it to work.

      I have never used the /J switch and have never eliminated the trailing slash in the origin.
      I noticed that you used a capital ‘C’ in the word Cache for destination. The images you sent me did not have that.
      DOS does distinguish between upper and lower case characters.

      This boggles my mind but thank you for the input.

      I’m sure this will help others if they are having problems,
      Richard

  10. Mirko

    Capital C or not, no difference for me, I tried all options of course before I asked for help.

  11. Honza

    Hello Richard,
    thanks a lot for your detailed guide! Works like a charm :)

    1. Richard

      Hi Honza,

      Now– that’s what we like to hear!

      Richard

  12. Yet2K

    Hi Richard, it seems to work, i have my cute little arrow on my folder. However, chrome is still writing on my ssd.
    I did a test by watching a big video on youtube and the free space specified on my ssd has changed (+1gb).
    I also see my new cache filling up with temporary cache files on my hdd.
    My question is: is chrome writing on both drive SSD and HDD?

    1. Richard

      Hi Yet2K,

      I f you click on the new SymLink you created on your SSD, you will see all of Chrome’s cache files there. That is because Windows, and Chrome for that matter, don’t know any better. It is a mirror image of the files that now exist on your HDD.

      To answer your question: No, the files are only being written to the new cache location. They only appear to still be on the SSD. Windows and Chrome think the cache is in its original location but you have basically fooled the system.

      Hope this helps,
      Richard

  13. Shavo

    Hi,
    thank you for this well articulated guide – it worked right away. On an unrelated note: What is the File Manager of your choice? I’ve been growing increasingly annoyed by the Windows Explorer and considered an alternative. Thanks!

    1. Richard

      Hi Shavo,

      I’m glad the information was useful for you.

      I use a portable version of Explorer++. It has many features including a memory which Windows Explorer is sorely lacking.

      Both 32 and 64-bit versions exist. It is fast, multi-tabbed if you like, split-panel if you like, and I find it to be fast. even when displaying thumbnails of huge image directories.

      You can set up buttons that will take to commonly-used directories. The list goes on and on.

      Here’s the link to the Explorer++ home page if you’d like to check it out: http://explorerplusplus.com/

      A portable version can be found here: http://portableapps.com/apps/utilities/explorerplusplus_portable

      Hope this helps,
      Richard

  14. yet2k

    thank you for the clarifications Richard

    1. Richard

      I’m happy it worked out for you,
      Richard

  15. Joshua

    I got it to work finally. the issue was the quotes you use and when I copy paste to modify it didn’t like them. Odd but hopefully someone else it helps.

    Yours didn’t – mklink /D “C:\
    this did – ​mklink /D “C:\

    1. AlteredCarbon

      Had that exact problem myself, Windows 7 Ultimate SP1. Went through and deleted/retyped all quotes, and worked great. Thanks for the tip, Joshua.

      Thanks as well to Richard for the original article, very nice to get the cache off my SSD.

      1. Richard

        Hi Joshua and AlteredCarbon,

        I’m glad you both found a solution, but for the life of me, I don’t understand what you are talking about.

        In Joshua’s example, on my screen, I don’t see a difference in the quotation marks. The only thing I can come up with, and it’s a wild guess, is that the editor on this site produces formatted text and there may be a difference in the ASCII value. Other than that, I have no idea.

        Aw well, whatever makes it work, I guess.

        Thanks for your input,
        Richard

  16. Richard

    Hello everyone!

    I have discovered the source of the quotations problem. It has to do with the new version of WordPress which powers WinCom7.

    Apparently they have added code that changes several formatting issues. Quotations are one of them. I have not as yet found a solution that will work with the current set up.

    In the mean time, you should follow the advice proffered in the preceding comments; that is, removing then replacing the quotes from any command lines shown in the article.

    In the mean time I will continue searching for a solution to this new WordPress “feature”.

    This is a system-wide problem and applies to any article on WinCom7.
    Again, I want to thank Joshua and AlteredCarbon for their insightfulness and for sharing this with us.

    Richard

  17. Corey

    Hi Richard,
    I followed your instruction and make chrome writes cahce data to the new folder I created on my ramdisk (F:\Chrome). However, the same cache data was also written in the folder “C:\Users\\AppData\Local\Google\Chrome\User Data\Default\Cache\”, as I noticed that both folders increased in size side by side and both have the same size after chrome finished loading a website. Do you know what cause this? Thanks.

  18. Corey

    Hi Richard,
    I just read your explanation to Yet2K, which is what I wanted to know. I tried to delete all files in the default Chrome cache directory and everything in the ramdisk folder was also gone (and vice versa).

    1. Richard

      Hi Corey,

      Here is a key point that you need to understand. Once you create the Symbolic Link what you see in the original directory is not actually there. It only looks like it’s there. Windows thinks it’s there so it reports what it knows to any file manager you use.

      Remember, it is a mirror image of the directory it is pointing to. If you change the files in the destination directory that will be reflected in the SymLinked directory.

      The whole purpose of this exercise is to make Windows, and Chrome in this case, unaware of the fact that all the files have been moved. Windows doesn’t know about the move and neither does Chrome. And that’s the idea.

      If you were to undo the link, Chrome would start putting its files back in the original directory, but your destination directory would no longer reflect those changes.

      I hope I haven’t muddied the waters too much,
      Richard

  19. Corey

    Hi Richard,
    Thank you for your further explanation. I want a little help from you. I set up a batch file with the following command and put it in the Startup folder with a hope that it will create a folder named “Chrome” in the ramdisk F when my computer starts.

    mkdir f:\Chrome

    However, I cannot see the folder after my computer boots up. So I have to run the batch file manually. I suspect that the batch file was run before the ramdisk program (I used SoftPerfect Ram Disk). Can you tell me how can I revise the batch file to achieve what I desire? Thanks.

    1. Richard

      Hi Corey,

      I don’t know a thing about SoftPerfect and can’t comment about that.

      I use DRDataRAM and it has the option of saving an image of itself to use when a reboot is done. That will solve the problem for you if you decide to use it. It is free for personal use and provides up to a 4GB RAMDrive.

      You can find the article with links to the software here: http://www.wincom7.com/ram-disks-blazing-fast-computer-speed/

      Richard

  20. Jaskaran

    Hi,

    Thanks for the guide, it worked for me once I read through the comments and realized I needed to create the destination folder before typing the command. It might help others to have that as part of the directions.

    There isn’t any way to move the Chrome installation though is there? Seems like as it continually updates (I think it is automatic now?) that it would also start to fill a smaller SSD but maybe not significantly.

    1. Richard

      Hi Jaskaran,

      As far as I know, Chrome installs to the same drive as the operating system and I don’t think there is a way to change that. :-(

      The updates should overwrite the original if all goes well. That means there should be no “growth” problem.

      As much as I like Google, as is with all big corporations, they have a propensity towards control. If I ever see a way to get Chrome to install where I want it to, I will certainly let everyone know.

      I should probably update this post to reflect all the pointers handed out by the good readers of WinCom7.

      Thanks for the comment and I’m glad you got it working,
      Richard

  21. Danish

    Is there any possibility to get it work without Administrator permission? I am trying to make chrome save all profile data and cache in roaming folder instead of local folder in my University’s computers, so that it will have all my data in all computers of my Uni, not in only one in which i install the chrome. However since it’s a University network, it is not possible to get Administrator permission.

    Thanks in advance.

    1. Richard

      Hi Danish,

      There are third party utilities that will allow you to create Symbolic Links. Whether you need Admin Rights to use them, I can’t say.
      Symbolic Link Creator is just one of many that come to mind.

      Hope this helps,
      Richard

      1. Danish

        Thanks for the reply. I tried the Symbolic Link Creator. It didn’t work for me as I installed it in one computer and linked the local user data folder to roaming user data folder, logged off from that computer, logged in to another computer, and it didn’t have my profile opened there.. I think i know why it didn’t work. SInce it will create the symbolic link in the local folder of the computer, it will delete that link from that computer once I log off from that computer.

        Do you know any workaround for this? Thanks.

      2. Richard

        Danish,

        I’m not sure, but it sounds like you’re trying to use the SymLinks across different computers. That won’t work.

        Symbolic Links will work on a single computer. There may be ways to achieve your goal, but as far as I know, SymLinks are not the right tool for the task.

        Hope this helps,
        Richard

  22. Dr John

    The /D command kept returning “The system cannot find the path specified” but the /J command worked. I have Win 7 X64 Ultimate ed.
    Mysteriouser and mysteriouser, eh?

    1. Richard

      Hi Dr John,

      Yes, it is,
      Richard

  23. Henry Wood

    I successfully made the change some weeks ago, thanks for the advice. However, on checking my new cache site today (F:Cache) I found the folder empty, the shortcut gone from the Chrome directory and a new Cache folder in there. I had monitored the new set-up daily after making the change and it worked fine. This latest development leads me to suspect it is all reset if Chrome browser is updated?

    Is there any way of finding out/being warned that Chrome is about to update? I believe it just happens in the background and no options are given to the user, the same as no options for making alterations.

    I love the Chrome broswer for speed but I do not like the way Google takes command and refuses to let go. I’m seriously considering uninstalling Chrome once again.

    1. Richard

      Hi Henry,

      I certainly agree with you where Chrome’s take-over attitude is concerned.

      Here’s the scoop. If you used the Chrome command-line to change the default cache location, it will indeed revert to the default location after an update. This should not happen if you create a SymLink. I should point out that some people have even had problems with SymLinks not “sticking”. It’s all very frustrating.

      In my opinion, the once very fast Chrome is now a bloated piece of software. For this reason I don’t use it anymore. Where my computer is concerned I am somewhat of a control freak and seriously dislike programs that do what they want to do. I don’t even like Chrome installing on my C: drive, but there is no way that I am aware of to change this behavior. That’s another reason I don’t use it anymore.

      If you’re looking for a fast Windows-specific compilation, then Palemoon might be worth a look-see. The 32-bit version works with every plug-in I’ve thrown at it; the 64-bit version is a bit trickier. There is even a Portable version which requires no installation whatsoever.

      Since Palemoon is a Firefox derivative, any instructions regarding Firefox will work with Palemoon as well.

      Hope this helps,
      Richard

  24. Henry Wood

    Thanks for the reply, Richard. The other main reason for choosing Chrome is I could stay synchronized between my three browsing ‘machines’, desktop, Google Nexus 7, and the one I’m using in bed atm, Samsung Galaxy Note 10″.
    However, they all run Firefox OK so I think tomorrow will be Chrome cleanout day. And I’ll be sure to give Palemoon a try.
    Thanks again for solving a problem which had bugged me for a couple of years, just a pity Google would not let it remain solved.

    1. Richard

      Hi Henry,

      There is a Firefox plug-in called XMarks. It does a great job of synching your bookmarks, history, tabs, etc.

      It’s what I use,
      Richard

  25. Ken

    Hi Richard, Thank you very much for posting the above. I followed the steps to create the link, and the link would link me to the cache folder on my D Drive. So the make link part works. However, when I open a Chrome browser window, the linked cache icon would disappear and is replaced by a regular cache folder. Might you have any clue?

    1. Richard

      Hi Ken,

      I don’t. I do know that Chrome constantly updates itself but I can’t think of reason why it should matter where the link is concerned. Honestly, why should Google care one jot where you keep the cache. It’s beyond me.

      Chrome is a frustrating piece of software– hands down. If the SymLink doesn’t “stick” I’m sorry to tell you I don’t have an answer. My only conclusion would be that it’s yet another aspect of Chrome that I don’t care for. I’ve stopped using it entirely.

      Now that haven’t helped you at all, you might try changing the command line in your Chrome shortcut. It’s only a temporary stop-gap until the next Chrome update but it will at least give you some control over the beast.

      Presuming your cache is located on the D drive, the command-line would look like this:

      –user-data-dir=”d:\

      If software is on my machine, I want to have control over it, and Chrome takes that all away.

      Hope this helps you,
      Richard

  26. Luna

    This is bloody brilliant. The command line didn’t work, but the mklink sure did! Thanks.

  27. someone

    Richard, thanks for the effort and after some testing it worked (to spare my SSD).

    There’s one other thingy though.

    When your Windows is in another language (in my case dutch) the local word for ‘user’ still has to be ‘user’ in the MKLINK /D instead of the local language for ‘user’ which is in the dutch case ‘gebruiker’ otherwise it won’t work.

  28. goldman

    Thank you

Leave a Reply

Your email address will not be published. Required fields are marked *