3

I have an SSD drive that is nearly full and I'm looking for options to free up space. I noticed C:\Users\myusername\AppData\Local\Temp has several gigs of data. Is it safe to change the User environment variables %TEMP% and %TMP% to point somewhere else (e.g. D:\temp, if D is my other disk with more space)?

Also what about changing the system environment variables of the same name to also point to D:\temp?

Edit Ideally the best answer would include a reference to an article or documentation.

I did find this documentation from Microsoft talking about making the change on an exchange server: Move Temp and TMP Directories

1
  • 3
    Every user needs to be able to write to their %TEMP%/%TMP% location. So, if you have multiple users on the PC, make sure you have the permissions set on D:\Temp to allow that. Commented Jul 25, 2012 at 23:26

2 Answers 2

3

As long as you coherently manage to redirect everything, yes, it is safe.

I would suggest looking for a guide for how to do that, just to make sure you don't miss anything, although I believe what you have suggested there should be sufficient.

EDIT (for reference): From the command prompt (cmd.exe) (you don't need to be an administrator), type SETX TEMP D:\Temp and press Enter

2
  • 3
    set only sets the environment variable within the prompt for that one session. setx is the persistent, system/user wide version. There's also a GUI for setting environment variables included with Windows.
    – Bob
    Commented Jul 25, 2012 at 23:48
  • That's why I asked the question I was looking for a guide.
    – User
    Commented Jul 26, 2012 at 19:00
1

For part 2: The system environment variables can be changed by changing the variables in system properties ([My computer], right click, [properties], tab Advanced, under "Environment variables").

I wonder if you actually need the data in temp folders though. They are more or less your automatic trashcan. Doing a disk cleanup first might actually free enough space so you do not need to move them. And performance wise you probably want those folders on your SSD.

[Edit] I reread an noticed you had the gigs of data in \AppData\Local not in temp. Which makes my answer less relevant. Still worth trying to free some space though. (Disk cleanup from windows, discard old restore point, optionally run something like ccleaner which also clears some data out of your profile).

4
  • Sorry it is in temp. Edited my question.
    – User
    Commented Jul 25, 2012 at 23:32
  • I do not like to advertise specific software here, but do try ccleaner first. Run the cleaner to free space, then 'tools' and 'system restore'. It is one of the trick I use to keep my SSD (a 80GB postvile G2) relatively clean.
    – Hennes
    Commented Jul 25, 2012 at 23:36
  • Any reason you choose ccleaner over the built-in Disk Cleanup utility? I may go this route but that means I need to periodically clean the disk rather than solving the problem once.
    – User
    Commented Jul 26, 2012 at 19:03
  • 1
    Two reasons: 1) Speed. ccleaner is almost an order faster. 2) It also [optionally] cleans some folders which windows disk cleanup seems to skip (e.g no longer needed AVG 2012 files).
    – Hennes
    Commented Jul 26, 2012 at 19:12

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .