• DBCC SHRINKFILE is the command you are after.  When used for a transaction log file, it will only release space that is at the end of the log file.  If there are transactions in that part of the file that have not been backed up ( I assume you are using FULL Recovery), then the log file will not shrink past the last part of the log file.  You will need to try again "later" if this occurs. 

    DBCC SHRINKFILE does not cause any transactions in the log file to be lost.