The difference between the two is that dpkg bypasses the APT package management database to operate the package, so you can install the package with dpkg installed with apt to be installed again, the system does not know the previous installation, will overwrite the previous dpkg installation.
1. dpkg is used to install the. deb file, but does not resolve the dependencies of the module and does not care about software in Ubuntu's software warehouse, which can be used to install local deb files.
2, APT will solve and install the module dependency problem, and will consult the software warehouse, but will not install the local deb file, APT is built on the DPKG software management tools.
Install packages
Dpkg-i package_name.deb//install local package, do not resolve dependencies
Apt-get Install package//Online installation packages
Aptitude install pattern//Ibid.
Apt-get Install package--reinstall//Reinstall packages
Apitude Reinstall Package//Ibid.
removing packages
Dpkg-r Package/Remove Packages
Apt-get Remove Package//IBID.
Aptitude Remove Package//IBID.
Dpkg-p//delete packages and configuration files
Apt-get Remove Package--purge//delete packages and configuration files
Apitude purge pattern//Ibid.
Automatic removal of packages
Apt-get autoremove//delete packages that are no longer needed
Questions about Ubuntu install software: apt-get and dpkg differences?