Relocating c:\hab to a different drive or folder

Ideally this should be done before habitat is installed:

  1. Create an empty hab folder on the drive where you want to keep all hab data
  2. Create a junction on the system drive that points to the above hab folder
New-Item -ItemType Directory -Path D:\hab
New-Item -ItemType Junction -Path (Join-Path $env:SystemDrive hab) -Target D:\hab

Completing these two steps should result in all data that habitat writes to c:\hab actually being saved to the other drive.

If this is being done on a system where hab had already been installed and packages already downloaded:

  1. stop the supervisor and any studios
  2. Move c:\hab to the drive where you want hab to reside
  3. Create the junction on the system drive pointing to this new folder as shown above.