A new procedure aiming at disentangling the instrumental profile broadening and the relevant X-ray powder diffraction (XRPD) profile shape is presented. The technique consists of three steps: denoising by means of wavelet transforms, background suppression by morphological functions and deblurring by a Lucy--Richardson damped deconvolution algorithm. Real XRPD intensity profiles of ceria samples are used to test the performances. Results show the robustness of the method and its capability of efficiently disentangling the instrumental broadening affecting the measurement of the intrinsic physical line profile. These features make the whole procedure an interesting and user-friendly tool for the pre-processing of XRPD data.