Commands For Package Management

To manage debian packages in ubuntu, we need few commands.

Here are my notes about  various commands :

  1. sudo apt-get install packagename :    Installs a package
  2. sudo apt-get purge packagename: Removes a package,dependencies and its
                                  configuration files
  3. sudo aptitude clean packagename:Deletes downloaded files which were necessary for
                                  installation
  4. sudo aptitude show packagename : Show details about a package name
  5. sudo aptitude dist-upgrade : Updates the Ubuntu system to the next version
  6. sudo dpkg -L packagename : Lists all files and their location in a package
  7. cat /var/log/dpkg.log | grep "\ install\ " :To search for the installed packages use the following command.
  8. sudo apt-get --reinstall install packagename :  If you somehow damage an installed package, or simply want the files of a
    package to be reinstalled with the newest version that is available,use this command.
  9. sudo apt-get -u upgrade :Run this command with the -u option.  This option
    causes APT to show the complete list of packages which will be upgraded.
    Without it, you'll be upgrading blindly.  APT will download the latest versions
    of each package and will install them in the proper order.  It's important to
    always run apt-get update before you try this.
  10. apt-get -u dselect-upgrade : dselect is a program that helps users select Debian packages for
    installation.dselect knows how to make use of the capacity Debian
    packages have for "recommending" and "suggesting" other packages for installation

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s