HOUSTON — When Adam Warren was traded by the Yankees to the Cubs for second baseman Starlin Castro last December, the reliever was so upset that he boxed up all the Yankees gear in his drawers. But he didn’t throw it away, and that’s a good thing because it’s back in style again since he returned to the Yankees in Monday’s trade for closer Aroldis Chapman.

It was a glowing Warren who happily returned to the Yankees’ clubhouse before Tuesday night’s game against the Astros at Minute Maid Park. He first heard that he might be included in the deal for Chapman early on Monday and was delighted when it came to fruition.

Describing his reaction when he heard he was part of the deal, Warren said, “I had a lot of mixed emotions. My wife kept asking me how I felt when we started hearing things. We were excited because we loved it here and hated to leave. It’s always nice to come back.

“It kind of feels like home. I enjoyed my time in Chicago, but it didn’t quite work out for me. So, I’m happy to come back to where I’m comfortable and people know me and I can just fit right back in.”

Warren, 28, got off to a strong start with the Cubs but then floundered in what he believes was a role that manager Joe Maddon left undefined. He was 3-2 with a 5.91 ERA and gave up seven home runs in 35 innings.

“I have a lot of opinions on why it didn’t go well,” Warren said of his Cubs experience. “Mainly, I never really had a set role. I think they wanted me to be a starter, but they had five starters who were throwing well and they were healthy. I was in the bullpen doing a lot of things.

advertisement | advertise on newsday

“I pride myself on my versatility, but not really knowing when you’re coming in was the hardest thing for me. The unpredictability of having to guess when I might pitch, I think I struggled with that a little bit.”

That versatility is why the Yankees insisted on getting Warren in the deal along with high-end shortstop prospect Gleyber Torres and minor-league outfielders Billy McKinney and Rashad Crawford. Now that Chapman is gone, Andrew Miller has taken over the closer role with Dellin Betances moving from the seventh-inning role to eighth-inning setup man.

Manager Joe Girardi on Tuesday said he has no designated reliever for the seventh inning and plans to use relievers for multiple innings on a rotating basis to form the bridge to Betances and Miller on the back end. Warren fits neatly into that role.

“It’s really good to see him back,” Girardi said. “We’ll start him in the bullpen for now. We feel he can add a lot, give us multiple innings and do some things where maybe you don’t have to use a Betances or a Miller on a certain night. We have a lot of confidence in him.”

The Yankees were aware of Warren’s struggles, but Girardi said they believe in his talent and that their familiarity will breed success. Warren couldn’t agree more.

Yankees videos

“They have confidence in me and know what I can do,” Warren said. “I feel like I don’t have to go out there and try to prove myself like maybe I did in Chicago. Maybe it does take a little bit of the pressure off of me.”