Find a generator for a given ideal in F[x]

Let $\theta$ be algebraic over $F$. Find a generator for the ideal $I = \{g(x) \in F[x] \ |\ g(\theta) = 0 \}$.

We showed previously that this ideal is generated by the minimal polynomial for $\theta$ over $F$.