  We present a general analysis of the cooling produced by losses on
condensates or quasi-condensates. We study how the occupations of the
collective phonon modes evolve in time, assuming that the loss process is slow
enough so that each mode adiabatically follows the decrease of the mean
density. The theory is valid for any loss process whose rate is proportional to
the $j$th power of the density, but otherwise spatially uniform. We cover both
homogeneous gases and systems confined in a smooth potential. For a
low-dimensional gas, we can take into account the modified equation of state
due to the broadening of the cloud width along the tightly confined directions,
which occurs for large interactions. We find that at large times, the
temperature decreases proportionally to the energy scale $mc^2$, where $m$ is
the mass of the particles and $c$ the sound velocity. We compute the asymptotic
ratio of these two quantities for different limiting cases: a homogeneous gas
in any dimension and a one-dimensional gas in a harmonic trap.
