In AX 2012 all the temp data is stored in TempDB database, which normally occupies alot of space after certain days. Below is the path for TempDB:
<YourDrive>:\SQL\MSSQL10_50.MSSQLSERVER\MSSQL\TempDB
You might see on the above path that there is a a database which is of a big size in GB's. You simply need to restart SQL Server service or restart the machine. This will flush all the temp memory from this database.
Hope this helps!