Apt-pinning provides a safe mechanism to mix and match packages from different Debian repository branches without breaking your base distribution.
A higher pin priority ensures that apt will prefer the stable package version over any other when installing. Note that these files have a .pref extension or none at all.
Open /etc/apt/preferences.d/debian-pinning.pref in an editor with root rights.
Package: * Pin: release a=stable Pin-Priority: 700 Package: * Pin: release a=jessie-backports Pin-Priority: 650 Package: * Pin: release a=testing Pin-Priority: 600 Package: * Pin: release a=unstable Pin-Priority: 550 Package: * Pin: release a=experimental Pin-Priority: 500
Save and exit.