USE [master]
ALTER DATABASE tempdb
REMOVE FILE tempdb2;
GO
You cannot remove the primary TempDB file and you can only remove other files if they are empty.