Sometimes you may need to downgrade a package, because you have some problems with the like the last version of the package. On Ubuntu, Debian, Linux Mint, Knoppix or other dpkg Linux distro, this is how you should do it:
The step 0 is to find out the exact version of the package you want to install.
Next, you can use the command line package managers (apt or aptitude), like this:
$ sudo apt-get install package=version
$ sudo aptitude install package=version
$ sudo apt-get install ruby1.8=1.8.4-5ubuntu1.2
$ sudo aptitude install ruby1.8=1.8.4-5ubuntu1.2
If you can find the prefered version of the *.deb package on the internet, you can remove your package with apt-get remove or aptitude remove and install the prefered *.deb with dpkg.
Remove the package, with one of the methods:
$ sudo apt-get remove package
$ sudo aptitude remove package
Install the new *.deb package:
$ sudo dpkg -i /path/to/*.deb
After you have installed the prefered version of the package (by using method 1 or method 2), do this to stop your system update your package, as root:
# echo “packagename hold” | dpkg --set-selections
# echo “ruby1.8 hold” | dpkg --set-selections
Note: there are two minus characters (-) before set-selections.