Deghosting of pressure‐only data has become a routine in marine seismic processing. Most existing techniques suffer from noise susceptibility or excessive simplification of the used ghost model, which leads to difficulties in removing the ghost waves. The algorithm presented in this paper is based on the wavefield extrapolation theory, and is capable of taking into account arbitrary streamer shapes and rough sea surfaces. The computations are performed in the frequency domain and come down to solving systems of linear equations. Regularization and data‐adaptive statistical optimization of the parameters prevent noise amplification. We describe the theory of the method and test it against synthetic and field datasets with different streamer shapes for both rough and flat sea surfaces.