Apt
Apt
Linux Packages
Linux strengths allowed this operating system to gain In more widespread linux distributions, programs are
a central place in the IT market distributed in binary RPM, DEB or modified TGZ
Package management played an important role in this formats
process
The Linux system’s coherency is assured maintaining RPM (RedHat Package Management) packages are
databases of installed files. In this way installing or used on RedHat, Mandrake, Suse, Conectiva
removing programs gets an easy task
DEB are used on the open source distribution Debian
Nowadays only few programs are installed using and its forks
source files
Modified TGZ are used on SlackWare
3 4
Dependencies management is a very useful feature of apt is a Debian tool used to manage packages in such a way
package management software that when the user asks for a package to be installed the
system also installs (or upgrades) all the necessary packages
They keep systems in a consistent state and
to make the package work.
guarantee the applications to run in the expected way
rpm or dpkg commands have limited dependencies
management features
They can report which library a package relies on,
but the library can itself relies on other packages…
5 6
1
3/14/2008
APT
APT is a system created in the Debian community to Command-line package management with APT
automatically manage the packages dependencies
APT can install, remove and upgrade packages, If you are comfortable using the Terminal, you can use apt
managing dependencies and downloading the (Advanced Packaging Tool) to install or remove software.
packages You need administrative access to use apt.
It’s a frontend to other tools, and it uses the
underlying package management system, like the
rpm or dpkg commands
It’s able to fetch packages from several media
(cdrom, ftp, http, nfs), and it can be used to create
ad-hoc software repositories
7 8
Some solutions
9 10
11 12
2
3/14/2008
Removal
•apt-get remove packagename - removes a installed package
(configfiles remain)
To remove a package:
sudo apt-get remove package •apt-get --purge remove packagename - removes a installed package
(configfiles will also be removed)
•A special trick: if you want to remove package “foo” and install
package “bar” in one step: apt-get --purge remove foo bar+.
15 16
17 18
3
3/14/2008
As part of its operation, APT uses a file that lists the he entries in this file normally follow this format:
'sources' from which packages can be obtained. This file is
/etc/apt/sources.list. deb http://host/debian distribution section1 section2 section3
deb-src http://host/debian distribution section1 section2 section3
Of course, the above entries are fictitious and should not be used. The
first word on each line, deb or deb-src, indicates the type of archive:
whether it contains binary packages (deb), that is, the pre-compiled
packages that we normally use, or source packages (deb-src), which
are the original program sources plus the Debian control file (.dsc) and
the diff.gz containing the changes needed for `debianizing' the program.
19 20
21 22
APT - Benefits
23