PDA

View Full Version : apt basics



Kethinov
11-18-2003, 11:53 PM
I've read a bunch of tutorials explaining how to use apt but I still find myself confused. I've been using Gentoo Linux for most of my Linux career and when you want to install something you simply emerge packagename. If I installed Knoppix to my hard drive and wanted to install Gnome, then update KDE to 3.2 how would I do this?

todsr1
11-19-2003, 11:58 AM
Once you've done a hard drive install take a look at the file /etc/apt/sources.list - this will contain a number of lines that point to the stable, testing and unstable branches of Debian at a German mirror. You probably ought to start by commenting out those lines and adding ones of the same format that point to a local mirror. There's a list on the Debian website. You'll have to be root to do all this, of course.
Run apt-get update from the command line to update your package cache then apt-get upgrade will upgrade all packages that can be - this won't replace packages from eg. stable with those from testing, apt-get dist-upgrade will do however.
Stable will be the default version so if you want newer packages use apt-get -t testing upgrade or replace testing with unstable. Or, just comment out the lines in /etc/apt/sources.list that point to stable and testing, run apt-get update and then apt-get dist-upgrade will give you a fully up-to-date unstable distro. That should update kde to whatever the latest version in unstable is.
To install gnome, I think all you'll need to do is an 'apt-get install gnome-core'
If you want a truly Debian system there are a bunch of Knoppix specific packages that will be sitting on your system and some of these won't get upgraded to newer versions - I solved this problem with 'apt-get install sysvinit/stable' before taking stable back out of my sources.list and update/upgrading again. Commands like apt-get --purge remove knoppix* will get most of the knoppix specific programs, but for heavens sake don't do this until you've changed sysvinit or you'll bork your system!
Good luck, it really is very easy!!