Shrink the TempDB:
-- this command shrinks the primary data file
dbcc shrinkfile (tempdev, 'target size in MB')
-- this command shrinks the log file, look at the last paragraph.
dbcc shrinkfile (templog, 'target size in MB')
Shrink Log File:
DBCC SHRINKFILE ('Test_log',TRUNCATEONLY)
BACKUP LOG "Test DB Name" WITH TRUNCATE_ONLY