Using Debian, if you run apt-get or aptitude to download and install a package only to find it's not available from the Debian or other repositories, you can download it as a .deb file and install it manually.
After download, a .deb file won't self install. To complete the installation, use dpkg commands as root user.
dpkg --install filename.deb
Other dpkg commands:
dpkg -r filename.deb
dpkg --remove filename.deb
dpkg --unpack filename.deb
dpkg --configure filename.deb
Check out the man page for more options.