The problems of the optimization of rigid-plastic cylindrical shells are studied under the condition that the shell wall thickness is piece-wise constant. It is assumed that the deflections of the shell are moderately large and the material obeys the von Mises yield condition and the associated deformation law. The optimization problem is posed as an optimal control problem and necessary optimality conditions are derived with the aid of the variational methods of optimality theory. The set of equations obtained is solved numerically. An example regarding the minimization of the central deflection of the shell with two steps in the thickness is presented.