WebSphere Issues

19/04/2017

Ubuntu Advanced Packaging Tool commands

Filed under: Linux, Other — Tags: — Ishtiaque @ 12:46 pm

1. apt-cache:

-> Search the repository for a package

  • apt-cache search apache2
  • apt-cache -n kernel
  • apt-cache pkgnames kernel

-> Display info of a package

  • apt-cache show apache2
  • apt-cache showpkg apache2

-> List dependent packages

  • apt-cache depends apache2

-> Search package based on file

  • apt-file search apache2.conf
  • apt-file list apache2

2. apt-get
-> Update: Synchronize the package index files with the repository source:

  • apt-get update

-> Apply all available updates to packages already installed:

  • apt-get upgrade (-u switch will show upgraded packages)
  • apt-get dist-upgrade (Remove obsolete packages)

-> Install

  • apt-get install apache2

-> Uninstall or Remove

  • apt-get remove apache2
  • apt-get –purge remove apache2 (Removes config files also)
  • apt-get autoremove (Remove package not needed anymore)

-> Clean cache

  • apt-get clean
Advertisements

Create a free website or blog at WordPress.com.

%d bloggers like this: