Let $X$ be a smooth complex algebraic variety with $H^0(X,\mathcal{O}\_X) = \mathbb{C}$ and $V \subset X$ an open subvariety whose complement has codimension two. Now, let $L\_{\varepsilon}$ be a line bundle on $V\_{\varepsilon} = V \times Spec[\mathbb{C}[\varepsilon]/(\varepsilon ^2)$. If we denote by $j\_{\varepsilon}: V\_{\varepsilon} \hookrightarrow X\_{\varepsilon} = X \times Spec(\mathbb{C}[\varepsilon]/(\varepsilon ^2))$ the natural inclusion, then is it true that $\tilde{L}\_{\varepsilon} = (j\_{\varepsilon})\_\* (L\_{\varepsilon})$ defines a line bundle on $X\_{\varepsilon}$ ? If not, is there any other approach to extend $L\_{\varepsilon}$ to $X\_{\varepsilon}$ ?



Extension of first order deformations of a line bundle
Under some conditions on $X,V$, your line bundle can be extended to $X\_{\varepsilon}$. Indeed, let $\imath\_X:X\hookrightarrow X\_{\varepsilon}$ and $\imath\_V:V\hookrightarrow V\_{\varepsilon}$ be two closed immersions and $\mathcal{I}\_X,\mathcal{I}\_V$ be the ideal sheaves respectively. By the following exact sequence
$$ 0\to \mathcal{I}\_X \to \mathcal{O}^{\times}\_{X\_{\varepsilon}}\to \mathcal{O}^{\times}\_X\to 0,$$
if we consider universal $\delta$-functor theory and a natural transformation $H^0(X,-)\to H^0(U,-)$, we have a diagram of two exact sequences
$$ 
\begin{aligned}H^1(X,\mathcal{I}\_X)&\to \mathrm{Pic}(X\_{\varepsilon})\to \mathrm{Pic}(X)\to H^2(X,\mathcal{I}\_X)
\\ \!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\downarrow \alpha&\,\,\,\,\,\,\,\,\,\,\,\,\,\,\downarrow\beta\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\downarrow \gamma\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\downarrow\delta
\\ H^1(V,\mathcal{I}\_V)&\to \mathrm{Pic}(V\_{\varepsilon})\to \mathrm{Pic}(V)\to H^2(V,\mathcal{I}\_V)
\end{aligned}$$
(see Hartshorne Exercises 3.4.6). Note that in the case, $\mathcal{I}\_X\cong \mathcal{O}\_X$ as $\mathcal{O}\_{X\_{\varepsilon}}$-modules and $\mathcal{I}\_V\cong \mathcal{O}\_V$ respectively.


Since $X$ is smooth, $\gamma$ is an isomorphism. Hence, if $\alpha$ is a surjection and $\delta$ is an injection, then $\beta$ is a surjection by five lemma and any line bundle on $V\_{\varepsilon}$ can be extended to $X\_{\varepsilon}$. Note that considering the local cohomology exact sequence
$$ H^1\_Z(X,\mathcal{O}\_X)\to H^1(X,\mathcal{O}\_X)\to H^1(V,\mathcal{O}\_V)\to H^2\_Z(X,\mathcal{O}\_X)\to H^2(X,\mathcal{O}\_X)\to H^2(V,\mathcal{O}\_V),$$
where $Z:=X\setminus U$, if $H^2\_Z(X,\mathcal{O}\_X)=0$, then $\beta$ is a surjection (it is worth saying that if $\mathrm{codim}\_X Z\ge 3$, then $H^2\_Z(X,\mathcal{O}\_X)=0$ by SGA2, III, Proposition 3.3).


