Top Commands to install, update, upgrade, find about Dpkg, programs, and Linux Packages - List Of Commands

23:25
In this blog you will learn

Top commands to deal with install, find, remove, update and upgrade the packages and dealing with dpkg

List of commands. The list of top commands helps to get advanced access and details about the programs we use regularly.
List of commands to Install packages
1 List All Available Packages
 $ apt-cache pkgnames 
2 Package Name and Description of Software?
 $ apt-cache search apache 
3 Check Package Information?
 $ apt-cache show bash 
4 Check Dependencies for Specific Packages?
 $ apt-cache showpkg bash 
5 Check statistics of Cache
 $ apt-cache stats 
6 How to Update System Packages
 $ sudo apt-get update 
7 How to Upgrade Software Packages
 $ sudo apt-get upgrade 
8 Unconcerned of whether software packages will be added or removed to fulfill dependencies, use the ‘dist-upgrade‘ sub command.
 $ sudo apt-get dist-upgrade 
9 I Install or Upgrade Specific Packages?
 $ sudo apt-get install netcat 
10 How I can Install Multiple Packages?
 $ sudo apt-get install nethogs goaccess 
11 How to install Packages without Upgrading
 $ sudo apt-get install packageName --no-upgrade 
12 How to Upgrade Only Specific Package ?
 $ sudo apt-get install packageName --only-upgrade 
13 How Do I Install Specific Package Version?
 $ sudo apt-get install vsftpd=2.3.5-3ubuntu1 
14 How Do I Remove Packages Without Configuration
 $ sudo apt-get remove vsftpd 
15 How Do I Completely(configuration files) Remove Packages
 $ sudo apt-get purge vsftpd 
16 Remove Packages both at same time
 $ sudo apt-get remove --purge vsftpd 
17 How I Can Clean Up Disk Space
 $ sudo apt-get clean 
18 How Do I Download Only Source Code of Package
 $ sudo apt-get --download-only source vsftpd 
19 How Can I Download and Unpack a Package
 $ sudo apt-get source vsftpd 
20 How Can I Download, Unpack and Compile a Package
 $ sudo apt-get --compile source goaccess 
21 How Do I Download a Package Without Installing
 $ sudo apt-get download nethogs 
22 How Do I Check Change Log of Package?
 $ sudo apt-get changelog vsftpd 
23 How Do I Check Broken Dependencies?
 $ sudo apt-get check 
24 How Do I Search and Build Dependencies?
 $ sudo apt-get build-dep netcat 
25 How I Can Auto clean Apt-Get Cache?
 $ sudo apt-get autoclean 
26 How I Can Auto remove Installed Packages?
 $ sudo apt-get autoremove vsftpd 
List of commands work with DPKG
27 Install a Package
 $ dpkg -i flashpluginnonfree_2.8.2+squeeze1_i386.deb 
28 List all the installed Packages
 $ dpkg -l 
29 To view a specific package installed or not
 $ dpkg -l apache2 
 $ which apache2 
30 Remove a Package
 $ dpkg -r flashpluginnonfree 
 $ udo dpkg --remove -force --force-remove-reinstreq PACKAGE_NAME_GOES_HERE
 $ apt-get remove package_name

31 You can also use ‘p‘ option in place of ‘r’ which will remove the package along with configuration file
 $ dpkg -p flashpluginnonfree 
32 View the Content of a Package
 $dpkg -c flashplugin-nonfree_3.2_i386.deb
33 Check a Package is installed or not
 $ dpkg -s flashplugin-nonfree 
34 Check the location of Packages installed
 $ dpkg -L flashplugin-nonfree 
35 Install all Packages from a Directory
 $ dpkg -R --install debpackages/ 
36 Unpack the Package but dont’ Configure
 $ dpkg --unpack flashplugin-nonfree_3.2_i386.deb 
37 Reconfigure a Unpacked Package
 $ dpkg --configure flashplugin-nonfree 
38 Replace available Package information
 $ dpkg –-update-avail package_name 
39 Erase Existing Available information of Package
 $ dpkg –-clear-avail 
40 Forget Uninstalled and Unavailable Packages
 $ dpkg --forget-old-unavail 
41 Display dpkg Licence
 $ dpkg --licence 
42 Display dpkg Version
 $ dpkg –version 
43 Get all the Help about dpkg
 $ dpkg –help