AbstractGiven an arbitrary graph E and a field K, the prime ideals as well as the primitive ideals of the Leavitt path algebra LK(E) are completely characterized in terms of their generators. The stratification of the prime spectrum of LK(E) is indicated with information on its individual stratum. Necessary and sufficient conditions are given on the graph E under which every prime ideal of the Leavitt path algebra LK(E) is primitive. Leavitt path algebras with Krull dimension zero are characterized and those with various prescribed Krull dimension are constructed. The minimal prime ideals of LK(E) are described in terms of the graphical properties of E and using this, complete descriptions of the height one as well as the co-height one prim...