Could someone help me understanding the command "sudo pacman -S --needed base-devel git"

Hello Garuda users,

Before people start bashing me up for posting something like this please listen.

I googled this command and found that

–needed

flag tells the reason for installation (Probably??) and

base-devel

is the group which contains the package git. What I couldn’t understand was the reason to explicitly define this. Couldn’t we still download the git package from arch repo without these flags?? So why such a bloated command how does this help??

Please help me understand this a little.

It represents a package group that you want more than just a small part of. You need much more than just git to build most things. That command isn't bloated, as it won't install things that already exist thanks to --needed.

If you run pacman -Ss base-devel you will see git is not in group, which is why that's added on.

Please find more information here:
https://wiki.archlinux.org/title/Meta_package_and_package_group

8 Likes

Thankyou for the explanation. I guess I made stupid mistakes understanding the flags :sweat_smile:. Thankyou for explaining it to me

2 Likes

A very good reference: pacman/Rosetta - ArchWiki

11 Likes

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.