SAN FRANCISCO — Tim Lincecum is being removed from the Giants’ starting rotation and replaced by Yusmeiro Petit, manager Bruce Bochy said Monday, and the switch will be open-ended depending on how both pitchers perform in their new roles.

Lincecum will move to the bullpen and could be available as soon as Tuesday. Petit, who is working on a remarkable string of 38 consecutive batters retired, will take Lincecum’s start Thursday against the Colorado Rockies.

“We’re going to give Timmy a break,” said Bochy. “More than anything, he needs to clean up his delivery a little bit. He was out of sorts, and he’s been working on it hard. Sometimes you can tinker a little bit too much with it. We just want to get him cleaned up and get him back to where he was not too long ago.”

For now, Lincecum will simply be skipping one start, but that could change.

“We’ll make the call on the next start after the Petit start,” Bochy said.

Bochy added that Lincecum is “all for this,” but the manager was clear that he hopes that the 30-year-old right-hander can find the form he exhibited from May through mid-July and regain his rotation spot during the September stretch run.

“A month or six weeks ago, he was throwing the ball as well as anybody,” Bochy said. “But he knows it’s probably a good time for this to try and clear his head. It would be critical to get him throwing like he was not too long ago, but I also think he can help us out in the bullpen. That’s not a bad thing.”

Over his last six starts, Lincecum has a 9.49 ERA and has given up 41 hits in 24﻿2/3 innings. His last start on Saturday against the Washington Nationals was a total disaster — he lasted just 2﻿2/3 innings, the second-shortest outing of his career, and gave up six hits and six runs while walking four.

When Lincecum was going well earlier in the year, Bochy said Lincecum “had better balance, less effort with his delivery and obviously he had confidence, too. I’m sure that’s part of it. When you can’t get the ball where you want, you start pressing and you compound the damage.”

Lincecum was not available for comment before Monday’s game against Colorado.

Follow Carl Steward on Twitter at twitter.com/stewardsfolly.