I'm not so new to Linux, I have a good basic usage of it, and I want to go deeper: my topic of choice are repositories. I know I have to add them in case I want to install some software. I know they are related to my distribution. I know they are like remote sites which tell my computer what it should or shouldn't install. But can some expert explain me repositories in detail? How can I manage them? Can I have a Linux system with custom repositories? Who maintains them? Thank you

  • Repositories are "software installation servers", not just something that tells what can and can't be installed, they hold what can be installed. Depending on the distro you may have custom, non-official repos that are managed by users like you and me. – user353477 Jun 25 '19 at 21:48
  • You'd better begin with "package management". Repos is not the core concept of the whole system. The basic functionality is still installing/removing/listing packages. Repo simply provides you a file server of pre-made packages. – 炸鱼薯条德里克 Jun 26 '19 at 2:45

can some expert...

ahem...I start with a (shortened) list by my package manager, called pacman, produced with pacman -Ss kernel ( = show all packages matching regex "kernel")

core/iptables 1:1.8.3-1 [installed]
    Linux kernel packet control tool (using legacy interface)
core/iptables-nft 1:1.8.3-1
    Linux kernel packet control tool (using nft interface)
core/kmod 26-2 [installed]
    Linux kernel module management tools and library
core/linux 5.1.12.arch1-1 (base) [installed]
    The Linux kernel and modules

"core" is the main repository, as my distro (archlinux) defines. When I install a package (pacman -S kmod) I can leave the repo's name out.

pacman -S shows me also packages from repos "extra" and "community". That's it, just three "levels" of importance. You could configure pacman like this: show me all packages out of all three repos, but synchronize / update only "core" and "extra"...

How could I be sure archlinux really does have repositories (and calls them so):

pacman -Sh (= help on -S or --sync) contains the line:

-s, --search <regex> search remote repositories for matching strings

[The real ANSWER PART ends here] [just finishing at the bottom, topic "systemd package"]

Find out what your package manager can do with repositories, then you will soon know what they are...they are a bit abstract. Package groups are a simpler concept. The word (base) above, in the last entry, is a group name.

I'm not so new to Linux, I have a good basic usage of it, and I want to go deeper: my topic of choice is ...

What different kinds of Linux, and Unix, are there? How do I install a distro onto my disk, and how do I boot it ? Can I install another distro onto another of my partitions ? When I choose one of these distros like archlinux, fedora, opensuse, gentoo etc., to stick with, how do I maintain my system? How do I install additional packages? How do I get an overview of all -- really all -- packages in my distro ? So what on earth about these libraries, or departments, or repositories ? They seem fundamental, and I somehow access them but how a package manager makes use of them, and how do I configure that?

I stop here. You said you want to go deeper, and I say go ahead. chazelaas once commented: PROFILE DONT SPECULATE (my caps). I add: forget REPOSITORIES for the moment. I think I understand your situation so I give you a plan (all these quetions right above, in a meaningful sequence) and explanations all around repositories and distros and package management, based on my experience in the last 6 months......they don't like theoretical discussions here, and me too I find reproducible test results more interesting than theoretical concepts. But no problem, it's me who finds this question surprisingly interesting.

I just become aware of how much information lies in this pacman -S output shown above. You have:

repository/ package-name pkg.vers.xy (group) [installed?] 
     A description you can search by string match even regex

I have not used yet any GUI app to manage my packages - they certainly use pacman on a lower level on archlinux. And pacman uses a DB locally and a archlinux server remotely. Luckily, all these package managers like rpm, apt, yum, pacman, etc.....I am stopping because I just googled and notice: a lot of articles compare rpm on the console with GUI frontends.

Start your research with something like "evolution of package managers" on opensource.com. Looks like a great article for you (and also me!). It starts with: What is a package manager? And then explains: What is a repository? in a techno-historical fashion. Very informative.

When I go pacman -Qs systemd (= show me all locally installed packages with "systemd" in name or description) I get:

local/netctl 1.20-1 (base)
    Profile based systemd network management
local/systemd 242.29-2 (base-devel)
    system and service manager
local/systemd-libs 242.29-2
    systemd client libraries
local/systemd-sysvcompat 242.29-2 (base)
    sysvinit compat for systemd 

Oh so I have a "local" repository where my installed packages go to, in a VIRTUAL sense. (physically they land as files on my root filesystem - and my package manager can show me the file list, too).

I give the "systemd" example above to show how important it is to control your local repository (when something gets broken), because without a correctly installed systemd package, and no alternative, your system wont work. To fix it I would then first --- in fact I had to, recently ---try a simple pacman -S systemd which SYNCHRONIZES my local repo with the (default) core repo. Or in other words that is how I fetch and install a "fresh" systemd from a archlinux server. Just like reaching for a rescue CD or so. So I mess up my system, and my pacman repairs it.

This is of course nothing against systemd! I just want to show how decisive a single package can be... Have to be able to manage them a bit - the ones you want and the ones you need!

I found way to wrap it up. Suddenly this man pacman, Option --sync, makes perfect sense (a bit paraphrased):

-S --sync

synchronize i.e. download and install package(s) directly from the remote repositories, including all dependencies...

| improve this answer | |

There's Linux, Linux, and Linux, but repositories are managed pretty much the same; they're an institution or big business with lots of fat pipes to the Intarwebz which mirror a master repository somewhere, so you can have a local repository close to you, and get Stuff faster. For example: Portland State University hosts repositories for several distros. (Scroll down for illo of penguin wearing a viking helmet: go Vikes!)

Joe User doesn't ordinarily manage a repository; it's done for us, but you get to pick and choose from the repositories what you want to download. If you really want to, be prepared to be deluged when new versions of distros arrive, your servers drown in hits, and your links to the Interweb choke.

But, a local repository normally just decides what distros they will host, and then automated scripts do the refreshing of content. And you might guess, when Linus kicks a new kernel out the door, Things Get Busy on the lines between Beaverton (his Home 20) and Downtown Portland, as well as everyplace else the Intertubes go.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.