Please look up the Global cache section of Unity User Manual for configuring global cache location.
Pascal
2 Likes
Oh, I am stupid. Thank you. :3c
system
April 20, 2019, 12:01pm
4
Not much helpful.
I followed this tutorial here in order to change the location of the npm and packages folders.
To do that (Windows 7 SP1 for me but I suspect that the process is about the same for W8 and W10):
create two new variables in “Environment Variables/System Variables” (do not modify any existing variable as mentioned in the tutorial!!!),
affect them the path where you want them to be stored. You do not need to create the directories , just enter the new path and Unity will create them,
if necessary, quit the hub entirely from the system tray and Unity,
restart the Hub and Unity and let Unity rebuild the cache.
Once done:
delete the npm and packages folders in “C:\Users\Username\AppData\Local\Unity\cache”,
start your projects and make sure all the packages you are using are there.
Here are the new variables I created; everything went fine.
23 Likes
Not much helpful.
I followed this tutorial here in order to change the location of the npm and packages folders.
To do that (Windows 7 SP1 for me but I suspect that the process is about the same for W8 and W10):
create two new variables in “Environment Variables/System Variables” (do not modify any existing variable as mentioned in the tutorial!!!),
affect them the path where you want them to be stored. You do not need to create the directories , just enter the new path and Unity will create them,
if necessary, quit the hub entirely from the system tray and Unity,
restart the Hub and Unity and let Unity rebuild the cache.
Once done:
delete the npm and packages folders in “C:\Users\Username\AppData\Local\Unity\cache”,
start your projects and make sure all the packages you are using are there.
Here are the new variables I created; everything went fine.
Will try this now, as the Unity “it shouldn’t be a problem with storing stuff on the C: Drive…”, well yes it is, my Windows SSD C: drive now has exactly ZERO bytes free and can’t download any more assets, despite the fact I have around 9-10TB free on other drives… hmmm!
3 Likes
Not much helpful.
I followed this tutorial here in order to change the location of the npm and packages folders.
To do that (Windows 7 SP1 for me but I suspect that the process is about the same for W8 and W10):
create two new variables in “Environment Variables/System Variables” (do not modify any existing variable as mentioned in the tutorial!!!),
affect them the path where you want them to be stored. You do not need to create the directories , just enter the new path and Unity will create them,
if necessary, quit the hub entirely from the system tray and Unity,
restart the Hub and Unity and let Unity rebuild the cache.
Once done:
delete the npm and packages folders in “C:\Users\Username\AppData\Local\Unity\cache”,
start your projects and make sure all the packages you are using are there.
Here are the new variables I created; everything went fine.
Full hero points for this!! You are a life saver. My C: disk is constantly filling up because of the caches. This worked exactly as you described, relocating my old caches onto a spare disk!
1 Like
To add to above:
As a speed up to above, copy contents of your npm and packages folders before opening unity to the new locations and delete them from AppData. You can tell it worked if Unity doesn’t recreate npm folder in old location.
Quitting Hub from the tray is also a crucial step
1 Like
gazram
September 23, 2022, 8:14am
8
Not much helpful.
I followed this tutorial here in order to change the location of the npm and packages folders.
To do that (Windows 7 SP1 for me but I suspect that the process is about the same for W8 and W10):
create two new variables in “Environment Variables/System Variables” (do not modify any existing variable as mentioned in the tutorial!!!),
affect them the path where you want them to be stored. You do not need to create the directories , just enter the new path and Unity will create them,
if necessary, quit the hub entirely from the system tray and Unity,
restart the Hub and Unity and let Unity rebuild the cache.
Once done:
delete the npm and packages folders in “C:\Users\Username\AppData\Local\Unity\cache”,
start your projects and make sure all the packages you are using are there.
Here are the new variables I created; everything went fine.
This is brilliant, worked a charm, thanks for your help.
1 Like
You can set the package cache location under Preferences these days:
Not sure which version introduced this, might have been 2022. It’s definitely in 2023.
1 Like