In spite of their simple description in terms of rotations or symplectic transformations in phase space, quadratic Hamiltonians such as those modeling the most common Gaussian operations on bosonic modes remain poorly understood in terms of entropy production. For instance, determining the von Neumann entropy produced by a Bogoliubov transformation is notably a hard problem, with generally no known analytical solution. Here, we overcome this difficulty by using the replica method, a tool borrowed from statistical physics and quantum field theory. We exhibit a first application of this method to the field of quantum optics, where it enables accessing entropies in a two-mode squeezer or optical parametric amplifier. As an illustration, we determine the entropy generated by amplifying a binary superposition of the vacuum and an arbitrary Fock state, which yields a surprisingly simple, yet unknown analytical expression.