apt mini howto
#### Package managament: ####
/etc/apt/sources.list:
deb http://security.debian.org/ etch/updates main contrib non-free
deb-src http://security.debian.org/ etch/updates main contrib non-free
deb http://http.us.debian.org/debian/ etch main contrib non-free
Please keep in mind that you also could use stable instead of etch
Here are some of the common actions you’ll use with apt:
# apt-cache search python    (Searches repositories for packages with python)
# apt-get install vim     (Installs vim)
# apt-get remove vim    (Removes vim)
# apt-get clean    (Deletes downloaded .deb files)
# apt-get -t unstable apache2-utils     (*) (Installs apache2-utils from unstable repository)
# dpkg -l     (Lists all installed packages)
# dpkg -i foo.deb     (Installs .deb package you manually downloaded)
# dpkg -L apache2-utils     (Lists files owned by package, i.e. those installed by apache2-utils)
(*) Requires a line in /etc/apt/sources.list describing unstable target i.e.:
deb http://mirrors.kernel.org/debian/ unstable contrib non-free
#### Backports ####
http://backports.org/
Using backports.org is very simple:
1. Add this line to your /etc/apt/sources.list
deb http://www.backports.org/debian etch-backports main contrib non-free
2. Run
# apt-get update
3. All backports are deactivated by default. If you want to install something from backports run:
# apt-get -t etch-backports install “package”
If you are using etch and you want apt to verify the downloaded backports you can import backports.org archive’s key into apt:
# apt-get install debian-backports-keyring
#### Upgrading a Debian System ####
You want to upgrade all the packages on your system to the latest versions or upgrade to newer release
Make sure your /etc/apt/sources.list is pointing to your desired sources, then run apt-get upgrade.
Always update your package lists first:
# apt-get update
This command upgrades all installed packages, but does not remove any packages to resolve dependencies:
# apt-get -u upgrade
This upgrades all installed packages, and removes or installs packages as needed to satisfy all dependencies:
# apt-get -u dist-upgrade
The -u flag gives you a chance to review all changes first. The upgrade can take several hours, depending on the speed of your Internet connection, and how many packages need to be downloaded.
#### Building packages from unstable repository ####
First you should have unstable repository in your /etc/apt/sources.list
For example:
deb-src http://ftp2.de.debian.org/debian/ unstable main contrib non-free
Next install some required software:
# apt-get install devscripts
Next update you packages list, get source, build it and install
For example we will build sim-im package from unstable:
# apt-get update
# apt-get source sim
# apt-get build-dep sim
# cd sim-0.9.5~svn20080806/
# debuild -us -uc
# cd -
# dpkg -i *.deb
Now you have sim installed in your debian system:
# dpkg -l|grep sim
rc sim 0.9.5~svn20080806-1 simple instant messenger (KDE)
ii sim-data 0.9.5~svn20080806-1 Sim-IM Instant Messenger data files
ii sim-qt 0.9.5~svn20080806-1 simple instant messenger (Qt)
Home