Leaders Barca climbed to 44 points, six ahead of their bitter rivals Madrid who have a game in hand and will visit Athletic Club later on Sunday.
Coach Xavi Hernandez made several changes to his regular team, resting key players such as Robert Lewandowski, Ronald Araujo and Frenkie de Jong ahead to their Copa del Rey quarter-final clash against Real Sociedad on Wednesday.
Pedri opened the scoring in the 34th minute when he latched onto a pass from Raphinha and tapped into an empty net.
With almost 70% of ball possession, Barcelona were dominant in every aspect of the game but did not create many clear opportunities to extend their lead, with only four shots on target the entire match.
After a first half in which Ansu Fati wasted a couple of chances before Pedri’s goal, Barcelona came back from the break at a slower pace and seamed content with their advantage as Getafe failed to mount a serious threat.
“We were not great tonight, it was not our best game at home and we have to improve a lot, but we got the three points and that’s massive,” coach Xavi told Movistar Plus.
“We struggled against an opponent who played with a low block with five-man on defence. It was an important victory in which we did not give our best version.”