Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

share|improve this question
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. – Patrick S. Jul 25 '12 at 23:26

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 (you don't need to be an administrator), type SETX TEMP=D:\Temp and press Enter

share|improve this answer
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 Jul 25 '12 at 23:48
That's why I asked the question I was looking for a guide. – User Jul 26 '12 at 19:00

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).

share|improve this answer
Sorry it is in temp. Edited my question. – User Jul 25 '12 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 Jul 25 '12 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 Jul 26 '12 at 19:03
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 Jul 26 '12 at 19:12

You must log in to answer this question.

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