In the present work full 1D3V particle-in-cell (PIC) simulations have been carried out for the propagation of relativistic electron beams (REBs) through an inhomogeneous background plasma. The suppression of the filamentation instability, responsible for beam divergence, is shown. The simulation also confirms that in the nonlinear regime too the REB propagation is better when it propagates through a plasma whose density is inhomogeneous transverse to the beam. The role of inhomogeneity scale length, its amplitude and the transverse beam temperature etc, in the suppression of the instability is studied in detail.