To upgrade nearly all packages with apt-get but “hold” some of them at the current version, you can use dpkg.
Let’s say I would like to upgrade my Debian or Ubuntu system with apt-get and here is what I’m getting:
If I don’t want to upgrade php5 package I can “hold” it:
Switch to root (su or sudo -s)
That’s it – after running apt-get upgrade again, the package will be “kept back”: