The Pirates declined a $3-million option on Ronny Cedeno. Cedeno, 28, hit .249/.297/.339 last season and was a finalist for the Gold Glove.
Barmes will be 33 in March and hit just .244/.312/.386 last season and is a career .252 hitter, but a very good defensive shortstop. Barmes made $3.93 million in 2011.
The Giants and Brewers were also interested in Barmes, who was tread to the Astros last November.
Follow all the free agent moves with the CBSSports.com Free Agent Tracker.