I'll assume $k$ is algebraically closed.
Remember that on a smooth curve $C$ the divisor class $[D]\in \text{Pic}(C)$ of a divisor $D$ is zero if and only if $D=\text{div}(f)$ for some rational function $f\in \text{Rat}(C)$.
In your case, writing $U=X\setminus \\{p_1,\cdots p_r\\}$, it follows that the kernel of the restriction map $ \text{Pic}^0(X)\to \text{Pic}(U) $ is included in the abelian subgroup of $\text{Pic}(X)$ generated by $[p_1],\cdots,[p_r]$ and is thus finitely generated.