Difference between `dpkg -i` and `apt-get install`

Solution 1:

dpkg -i installs *.deb packages, which is to say packages you have already downloaded from somewhere. It also configures them, but does not download/install dependencies. You need to have downloaded the binary package file(s) manually from somewhere. There also may be hazards in downloading packages from locations that are not the repositories which your distro had included/enabled by default, since third-party packages can be malicious in nature.


apt-get/aptitude install automatically accesses the repositories and PPAs indexes you enabled, searches for the best candidate, downloads it and all its dependencies and installs and configures them automatically.

Using apt-get install -f, you can automatically install missing dependencies of packages e.g. installed through dpkg -i.