Herbalist Dr MziziMkavu
Platinum Member
- Feb 3, 2009
- 43,113
- 34,953
What is apt?
apt is a Debian tool used to manage packages in such a way that when the user asks for a package to be installed the system also installs (or upgrades) all the necessary packages to make the package work.
The apt we're documenting here is the version that works with rpm files.
To use apt-get and its friends, you'll have to install the package apt. If your GNU/Linux vendor supports apt, you'll find it at his FTP site.
[TABLE="class: WARNING, width: 100%"]
[TR]
[TD]Warning[/TD]
[/TR]
[/TABLE]
[TABLE="class: WARNING, width: 100%"]
[TR]
[TD][/TD]
[/TR]
[TR]
[TD]This is a development version. It may screw up your system, so use it at your own risk.[/TD]
[/TR]
[/TABLE]
Installing and configuring your system for apt
To use apt you'll have to do the following procedure:
apt is a Debian tool used to manage packages in such a way that when the user asks for a package to be installed the system also installs (or upgrades) all the necessary packages to make the package work.
The apt we're documenting here is the version that works with rpm files.
To use apt-get and its friends, you'll have to install the package apt. If your GNU/Linux vendor supports apt, you'll find it at his FTP site.
[TABLE="class: WARNING, width: 100%"]
[TR]
[TD]Warning[/TD]
[/TR]
[/TABLE]
[TABLE="class: WARNING, width: 100%"]
[TR]
[TD][/TD]
[/TR]
[TR]
[TD]This is a development version. It may screw up your system, so use it at your own risk.[/TD]
[/TR]
[/TABLE]
Installing and configuring your system for apt
To use apt you'll have to do the following procedure:
- become root user
- install the apt package with either rpm -ihv or rpm -Uhv. This package can be obtained from your vendor's site (if he supports apt or maybe even from your distribution CD).
- run apt-get update to download the package's database from the default server[1]
- run apt-get check, so that apt can verify if your box is OK and all package's dependencies are correctly satisfiedNote: If your system isn't seriously broken, you'll be able to fix it with apt-get -f install. If its broken, you'll have to fix these dependencies by hand (I mean, using the rpmcommand) before start using apt.
- If everything goes fine, you'll be able to use apt-get's and other apt's commands listed later in this document.
How to use apt-get
apt-get's commands are very easy and intuitive.
Its commands follow this structure:
[TABLE="width: 100%"]
[TR]
[TD="bgcolor: white"] # apt-get [options] command
# apt-get [options] install package [package ...]
[/TD]
[/TR]
[/TABLE]
- The command line may be a variation of the following basic types:
- apt-get updateUpdates apt-get's local database with server's pkglist's files.
- apt-get checkverifies system's integrity using apt
- apt-get install some-packageinstalls some new package, automatically resolving and downloading dependent packages
- apt-get upgradechecks for outdated packages in the system and automatically upgrades them
- apt-get dist-upgradesame as apt-get upgrade, but installs all base packages and tries to upgrade everything, installing new packages if needed
- apt-get remove some-packageremoves the some-package package and all other packages that depends on it
- apt-get cleanremoves the downloaded packages from the cache directory (/var/cache/apt/archives/), freeing some disk space at your system ;-)
How to use apt-cache
Besides apt-get there's also apt-cache.
apt-cache is a command to manipulate and obtain information from the packages at apt's cache.
This command is not to be used by common users. You'll like it if you're developing something to be used with apt.
apt-cache addAdds a package file to the source cache.
apt-cache gencachesBuilds both the package and source cache
apt-cache showpkgShow some general information for a single package
apt-cache statsShow some basic statistics
apt-cache dumpShow the entire file in a terse form
apt-cache dumpavailPrint an available file to stdout
apt-cache unmetShow unmet dependencies
apt-cache checkCheck the cache a bit
apt-cache searchSearch the package list for a regex pattern
apt-cache showShow a readable record for the package
apt-cache dependsShow raw dependency information for a package
apt-cache pkgnamesList the names of all packages
apt-cache dottyGenerate package graphs for GraphVis
