It has been suggested the Uruguayan playmaker, who joined Saints in the summer from Bologna, could be set for a return to Italian football.
However, Galliani says Milan are not considering a move for Ramirez as they are happy with the options currently available within the squad.
"Gaston Ramirez? We are OK in terms of player numbers and then we'll take someone only if someone leaves," he told Sky Italia.
One player set to join Milan in the summer is Riccardo Saponara, after a deal was agreed to bring in the midfielder from Empoli.
Galliani said: "I like Saponara and he fits in with the parameters with which we want to make AC Milan grow, because we are implementing a policy of young players."
Saponara told La Gazzetta dello Sport: "When I heard the news I started to cry for joy, I never thought I could achieve such a goal. I could not ask for more, it is a dream. Kaka has always been my idol."