The 24-year-old Lin was cut by Boston on Oct. 17. He spent much of the season with Triple-A Pawtucket, but hit .250 (3 for 12) over nine games with the Red Sox.
Del Rosario had no record and a 9.00 ERA in 19 games with the Astros this season. The 27-year-old right-hander is 1-4 with a 5.60 ERA in 84 career games with Cincinnati and Houston.
Astros general manager Jeff Luhnow announced the moves on Friday.