Simply put, a repository (aka archive) is a software (aka package) depot
directly usable by the system. This software depot may reside on a CD or DVD, local hard drive, a PC next room, or the Internet.
Don't confuse other -general- uses of these terms with their special meanings in Debian (Kubuntu) software management realm. To make an analogy, you would call firefox-1.0-setup.exe and openoffice-2.0-beta.zip as "packages", and www.download.com and www.tucows.com as "archives" (repositories) in the Windows software management realm.
A repository is basically a vast collection (a sea, a lake, or
sometimes just a puddle) of programs that are tested and
guaranteed to satisfy interdependencies and work smoothly with a given
system. You could regard it as an amazingly sophisticated "www.download.com",
except that all the programs are tuned for your system, and that they are
known by the "package manager" (analogous to the
"Add/Remove Programs" in Windows). That is, you are no
more required to dig around Internet to search for a given program.
You don't even need to fire up your web browser to search and
install software. They're right there in front of you, listed in the
package manager: You can search for programs just like you would do
inside "download.com", read their short descriptions, and
if you happen to want to install one or more of them all you need to
do is just ticking on them and then confirming your selections.
They, along with all their requirements, will be fetched from
Internet and installed by the package manager, all transparently to
you. More than 15000 programs at your fingertips by just "subscribing" to a few repos!
With some operating systems like Windows and MacOSX, you search
around Internet to find a program, download it, then click on it and
answer several questions to install it. In contrast, with most Linux
distributions including Kubuntu, you don't search the
Internet for software, but you subscribe to repositories. You subscribe to
software repositories for once, and all the software they have to
offer are directly known by the Kubuntu package manager as if they
were part of a greater Kubuntu. By the way, official repositories
are part of the greater Kubuntu, which is an iceberg,
and the installation CD is just the tip of it. The rest of the
iceberg is the official repositories on Internet. This is the main
conceptual difference from a user's point of view. Instead of
knowing which web sites to go for software, you need to know which
repositories to subscribe to (certain official repositories are already
subscribed to by default).
Meanwhile, in addition to the repositories, the old way of independent software
downloading and installing option is also there with Kubuntu, but
using repositories is so easy, convenient and satisfactory an
experience, that once you get to the comfort of it you will hardly
look back.
There are various repositories, some of them are "official"
and maintained particularly for your version of Kubuntu by its publisher, and others
are "unofficial", maintained by other people. Some of
these unofficial repos contain programs not found in the official
ones (e.g. due to unacceptable license terms or legal
uncertainities). Some others contain latest versions of several programs in the official repos. The software found in these unofficial repositories may
not always be tuned particularly for your Kubuntu system, and installing
programs from them may sometimes lead to compatibility and stability
issues, particularly so with the "latest version" unofficial repositories.
For this reason, "latest version" unofficial repositories are ignored
in this document. For a casual user, they could probably be more
trouble than their worth. Anyway, Kubuntu is already releasing the
latest program versions in 6 months periods.
As a side note, there are several package manager ("Add/Remove Software" in Windows) programs with differing
user-interface features, yet all doing the same thing behind the
scenes. Just like various KaZaA clients or various web browsers doing the same thing with different look and feel.
Kubuntu comes with "kynaptic" package manager by default.
It's a simple one, and thus more appealing for a new user. For
others, I would recommend installing its big brother, the "synaptic"
package manager.
This is the minimum "/etc/apt/sources.list" file you need, in order to install the programs mentioned in this FAQ, unless otherwise noted. There are also various other repositories which are not addressed in this document.
Important : If you skip this step, you will probably have a wild, unstable system at the first "repository upgrade". So, as the first thing to do, download this "preferences" file and then,
sudo cp -f preferences /etc/apt/
Download this sources.list file into your working directory (which is initially tuned for amd64).
Edit the downloaded sources.list (right click on it -> Open With -> Kate) and do the modifications below, according to the instructions in the file:
If you're using an amd64 machine then skip this step. Otherwise,
Replace the "deb cdrom:" line at the top of the file with the one in your original /etc/apt/sources.list file,
Comment-out (disable) the "deb" lines (insert '#' as the first character) in "For amd64 Only" block,
Uncomment (enable) the "deb" lines (remove '#' character at the start) in "For i386 Only" block.
Replace the "tr" occurences in official repository URLs with the country code in your original /etc/apt/sources.list file.
Uncomment (enable) one of the "deb" lines (the one geographically closest to you) in "Blackdown Java Mirrors" block.
Note that all the Java mirrors are initially commented out in the downloaded file. So, you won't have Java available unless you uncomment one of the Blackdown repositories.
Also note that you can get the current Java mirrors from http://www.blackdown.org/java-linux/java-linux-d2.html However, you shouldn't use one of the broken mirrors (listed in the downloaded file) without first verifying that it actually works.
Uncomment (enable) one of the "deb" lines (the one geographically closest to you) in "Ubuntu Backports Project Mirrors" block.
Note that all the UBP mirrors are initially commented out in the downloaded file. So, you won't have UBP packages available unless you uncomment one of the UBP repositories.
Kynaptic is the default package manager of Kubuntu 5.04. It can be regarded as the "Add/Remove Programs" of Windows. Kynaptic is simple and easy to use, but it misses some powerful functions of its big brother, Synaptic. Hence, Kynaptic is more suited for new users, while experienced users might find Synaptic more appropriate.
Import Marked Changes...
Export Marked Changes...
Refresh Package Information : Same as the 1st toolbar icon. Equivalent to "apt-get update". Gets the latest package lists and status from the repositories according to /etc/apt/sources.list
Upgrade All Packages... : Same as the 2nd toolbar icon. Equivalent to "apt-get distupgrade". Upgrades all currently installed packages on the actual system to their latest versions from the repositories.
Fix Broken Packages... : Equivalent to "apt-get -f install".
Commit Marked Changes... : Same as the 3rd toolbar icon. Confirms and starts actual installation and removal of packages. You first search for and select packages for installation and/or removal, then press this button to confirm your selections and start actual install/remove operation.
Undo
Redo
Find... (Ctrl+F) : One of the more powerful features, as described below.
Filters...
Toolbar:
: Refresh package information from repositories (same as 3rd entry in "File" menu)
: Upgrade all packages (same as 4th entry in "File" menu)
: Commit changes to the system (same last entry in "File" menu)
Find... (Ctrl+F) :
Search for a string or regular expression in package name, short (one-liner) summary, and/or description (one or several paragraphs). For simple string search in package names, search results can be shown dynamically, as you type.
Packages Frame :
Found packages (or all packages if no search has been performed) are listed, each with a descriptive icon appropriate for their status, like below : (Package "acct" not installed yet, but available in repositories) : (Package "gzip" is installed, but a newer version is available) : (Package "acpi" is installed and at the latest version available)
Package actions :
Actions on packages are taken by clicking on their icons. A sub-menu pops up, with various actions enabled depending on the package's status: This is for an installed but stale package (e.g. "gzip" above):
Unmark resets a previous selection for some particular operation, before it's committed.
Install selects the package for installation.
Reinstall installs the same version of package from the repository, over to the already installed one (could be necessary to fix a package whose files has been damaged in the current system).
Upgrade installs the latest version of the package over to the already installed -older- one.
It will ask for password. Give your own user password, and main kynaptic window will open. Press Ctrl+F and a search window will open. There you can search for software by their name, short (one-liner) summary info, or their full descriptions.
Let's assume you want to install "synaptic" package manager but can only remember that its name was something like "cryptic" or so. Enter "ptic" as keyword and you will be left with a handful of packages to select from. You'll see that kynaptic is already installed, and synaptic is available but not installed. Select it for install, and you will be presented with several more programs needed for synaptic. That is, synaptic program "depends" on those other programs and they must also be installed in order to be able to install synaptic. Accept the list by clicking on button.
At this point you may either continue to do other software selections for installation, or go ahead and install synaptic (along with its dependencies). Let's assume you also want to explore some chess software. Enter "chess" into search field and you will be presented with a few chess programs, but "xboard" won't be on the list. So, check the Summary field and press button. Now there are more software found, including xboard. Select xboard for installation, and accept its pre-requirements too (in my case it was just a "xaw3dg" package).
Now close the Search window, and click on the button (commit and proceed). You will be given a short account of what is about to be done, and upon your confirmation, all the software will be retrieved from the repositories over the Internet, installed, and their icons will be put at the relevant places in the K-Menu. You've just installed two nice software!
From command line:
To update package status information:
sudo apt-get update
To upgrade all packages currently installed in the system to their latest versions:
As a side note, the "_" character in package file names delimits the package name, version and architecture fields, respectively. So, nvu_0.90-1ubuntu2_amd64.deb reflects that it is the 'nvu' package of version '0.90-1ubuntu2' for computers with 'amd64' (Athlon64 or Opteron) CPU.
'alien' should not be used to replace important system packages, like init, libc, or other things that are essential for the functioning of your system. If you can’t remove a package without breaking your system, don’t try to replace it with an alien version.
Instead of installing discrete packages with "dpkg -i package_name.deb", these packages can be made into a repository and then installed/queried with kynaptic (or "apt-get install package_name"). It is assumed that the repository will reside in a "/myrepo" directory, which may be a local, USB, or NFS-mounted (remote) hard disk. You will need write access to /myrepo while creating the repository (become root user via "sudo -i" if necessary), and read access while using it.
Put all your .deb packages into '/myrepo' directory
cd /myrepodpkg-scanpackages . /dev/null | gzip -9c > Packages.gz
In order to use this newly created (or updated) repository,
Edit '/etc/apt/sources.list', as root, and place the following line towards to top of the file, preferably just after the "deb cdrom:" line:
deb file:/myrepo /
The reason for placing it before other "deb" lines is, that when kynaptic (or apt-get) finds duplicate versions of a given package in more than one repository, it prefers the first one to fetch the package from. By placing your repository before the others, you effectively prevent unnecessary downloading of packages from internet which are already available in your local repository.
Repeat the previous steps whenever you add/replace/remove a .deb package in /myrepo directory.
Serve '/myrepo' directory, on the server, over http and/or anonymous ftp. E.g.:
sudo ln -s /myrepo /var/www/
Assuming that the corresponding URL for the repository directory being served is 'http://myreposerver/myrepo' or 'ftp://myreposerver/pub/myrepo', do as below on each remote machine:
Edit '/etc/apt/sources.list', as root, and place one of the following lines at the top of the file (so that packages in your LAN-repository will have higher fetch-priority than the same version packages on Internet-repositories), depending on the protocol you're using:
deb http://myreposerver/myrepo /
## OR ##
deb ftp://myreposerver/pub/myrepo /
Repeat the previous steps whenever a repository update occurs on "myreposerver".
Note: Instead of 'myreposerver' you can use its IP address as well, such as
All the packages implicitly downloaded by apt-get (or kynaptic) are cached in '/var/cache/apt/archives' directory. Get them into your personal repository, along with other .deb packages you've downloaded manually.
Kubuntu installation also caches (as an "unwanted convenience") all the packages on the installation CD into /var/cache/apt/archives too. Take care not to include the packages already on installation CD into your personal repository.
They can safely be removed from the package cache (via "sudo apt-get clean"), but once the "installation-CD" packages get mixed with the "extra" ones, it's not so straightforward to sort them out. So, you may want to;
Install the pilot machine while it's off-line,
then clean the package cache via "sudo apt-get clean",
then get online and download/install extra packages,
and finally copy/move extra packages (/var/cache/apt/archives/*.deb) to your own repository directory, before creating your own repository.
Some installation-CD packages can still creep into the package cache, after the initial cache cleaning, if you install a package from the installation CD later on.
Install Kubuntu on other machines (or reinstall on the pilot machine) offline;
Choose against automatic downloading of additional i18n/l10n packages and latest base package updates, while installing (assuming they're already included in your local repository).
Introduce your personal repository to the newly installed machine via one of the ways below, depending on your repository type:
For network (LAN) repository, edit '/etc/apt/sources.list', as root, and place a line similar to either of the following lines at the top of the file (to give your LAN-repo higher priority)...
deb http://myreposerver/myrepo /
## OR ##
deb ftp://myreposerver/pub/myrepo /
...and then do a repository update:
For CD/DVD repository, insert the CD/DVD in the offline machine's tray and issue:
sudo apt-cdrom add
Install extra packages on the newly installed machine, from your personal repository.
Some programs (see Notes in "Stock Kubuntu Applications") don't place or mis-place their icons in K-Menu, as well as most programs you install manually. For such programs, you might need to place or relocate their icons in K-Menu manually yourself.
Right click on the (K Menu) button located at the bottom-left corner of your screen, then select "Menu Editor" from the pop-up list. It is the same as entering "kmenuedit" command from Konsole terminal.
In kmenuedit, you will find the editable directory tree representation of the K-Menu. You can add, delete, modify, or relocate (by just drag & dropping) both menu entries and sub-menus (directories) as you wish. Empty directories in kmenuedit are not shown as empty sub-menus in K-Menu. Sub-menus appear when you place a menu entry in them.
While adding an entry, note the following:
Name: The name by which this program will be seen on K-Menu.
Description and Comment: Shown as tool-tips etc.
Command: The action to be taken when K-Menu entry is clicked. The command you would enter from a Konsole terminal session to start the program (usually just its name in small letters).
[x] Enable launch feedback: The jumping busy indicator. You'd want this enabled.
[ ] Place in system tray: Self explanatory. Depends on the application.
[ ] Run in terminal: Opens a Konsole terminal first, then runs the application from within it. Leave empty the application has GUI. Check it if it's a text based program that needs to be run in a terminal.
[ ] Run as a different user: Normally leave it empty. Check it for administrative programs that need to be run by the "root" user (leave the "Username" field empty).