In this short note, we deal with complete noncompact expanding and steady Ricci solitons of dimension $n\geq 3.$ More precisely, under an integrability assumption, we obtain a characterization for the generalized cigar Ricci soliton and the Gaussian Ricci soliton.