Managing Debian Software with APT (apt-get etc) |
Prev |
Home |
Next |
3.3 Removing packages
If you no longer want to use a package, you can remove it from your system
using APT. To do this just type: apt-get remove package. For
example:
# apt-get remove gnome-panel
Reading Package Lists... Done
Building Dependency Tree... Done
The following packages will be REMOVED:
gnome-applets gnome-panel gnome-panel-data gnome-session
0 packages upgraded, 0 newly installed, 4 to remove and 1 not upgraded.
Need to get 0B of archives. After unpacking 14.6MB will be freed.
Do you want to continue? [Y/n]
As you can see in the above example, APT also takes care of removing packages
which depend on the package you have asked to remove. There is no way to
remove a package using APT without also removing those packages that depend on
it.
Running apt-get
as above will cause the packages to be removed but
their configuration files, if any, will remain intact on the system. For a
complete removal of the package, run:
# apt-get --purge remove gnome-panel
Reading Package Lists... Done
Building Dependency Tree... Done
The following packages will be REMOVED:
gnome-applets* gnome-panel* gnome-panel-data* gnome-session*
0 packages upgraded, 0 newly installed, 4 to remove and 1 not upgraded.
Need to get 0B of archives. After unpacking 14.6MB will be freed.
Do you want to continue? [Y/n]
Note the '*' after the names. This indicates that the configuration files for
each of these packages will also be removed.
Just as in the case of the install method, you can use a symbol
with remove to invert the meaning for a particular package. In
the case of removing, if you add a '+' right after the package
name, the package will be installed instead of being removed.
# apt-get --purge remove gnome-panel nautilus+
Reading Package Lists... Done
Building Dependency Tree... Done
The following extra packages will be installed:
bonobo libmedusa0 libnautilus0 nautilus
The following packages will be REMOVED:
gnome-applets* gnome-panel* gnome-panel-data* gnome-session*
The following NEW packages will be installed:
bonobo libmedusa0 libnautilus0 nautilus
0 packages upgraded, 4 newly installed, 4 to remove and 1 not upgraded.
Need to get 8329kB of archives. After unpacking 2594kB will be used.
Do you want to continue? [Y/n]
Note that apt-get
lists the extra packages which will be installed
(that is, the packages whose installation is needed for the proper functioning
of the package whose installation has been requested), those which will be
removed, and those which will be installed (including the extra packages
again).
Managing Debian Software with APT (apt-get etc) |
Prev |
Home |
Next |