Removing packages from linux (ubuntu)

I tried to remove the packages from maverick (Ubuntu 10.10), today..and found some good ways to do it

(A)First search the package :

The traditional way:
dpkg -l | grep partial-name-of-package-to-be-removed
Using dpkg command ....more conspicuous way
dpkg -l '*partial-name-of-package-to-be-removed*'
For example, you want to remove jdk then
dpkg -l '*jdk*'

(B)There are two ways to remove packages:

Using apt command : ...the better way...

After getting the list of packages choose the appropriate one and run following command

* To remove packages:
sudo apt-get remove package-name
* To remove packages and dependencies:
sudo apt-get autoremove package-name
* To remove packages, dependencies and configuration files:
sudo apt-get purge package-name

Using dpkg command : ...the crude way...

* To remove packages:
sudo dpkg -r package-name

* To remove packages,and configuration files:
sudo dpkg --purge package-name
* To force removal, if got dependency error(this command turns errors into warning..):
sudo dpkg --purge --force-depends package-name

Comments

Popular posts from this blog

getting android emulator to work normally on 64 bit linux

specs 2, Scala and maven with IntelliJ 12.1 and getting things right

me, akka and scala