Donald Trump on Wednesday ruled out firing Defense Secretary Pete Hegseth despite suffering bruising midterm elections losses that the US president has blamed on the war against Iran.