How to manually install a package?

I have slow internet
I know I can download a package using

sudo pacman -Sw package

but how can I manually install it? using pacman

pacman -Syu <package name>.

But I think you can leave out the u. Probably the y too.

sudo pacman -S <packageName>

Both the y and u options will do things over the internet, so if you wish to avoid internet usage, that’s what I would recommend.


actually it didn’t work it start updating full system

Oh yes it worked only need to use -S Thanks a lot

1 Like

You know, this all is already written in pacman manpage and countless webpages. Don’t be lazy, search and read. :stuck_out_tongue:

Unless you know your system is fully up-to-date

sudo pacman -S <pkgname>
 $ man pacman
       -U, --upgrade
           Upgrade or add package(s) to the system and install the
           required dependencies from sync repositories. Either a
           URL or file path can be specified. This is a
           “remove-then-add” process. See Upgrade Options below;
           also see Handling Config Files for an explanation on how
           pacman takes care of configuration files.

but it worked and my system isn’t fully up-to-date

Just don’t cry when it doesn’t. :stuck_out_tongue: Partial updates are not supported.

That’s pure Luck. Now your system is in a partially updated, unsupported state.

I never said you should, because you need to be updated, It has been covered here on the foum countless times why.

I’m just curious and this maybe my wrong assumption , correct me If I’m wrong but I think -U is there to update package for different version let’s say If I want to move to older version I can use -U but if there is new package I can use -S and get away with it so this way my system won’t be in Partial updates

Why assume when you can read manpage. @linux-aarhus even pasted relevant snippet. With -U: Either a URL or file path can be specified. With -S it checks database.

Has nothing to do with versions.

Nonsense. As I keep saying, -S only installs things that are consistent with your local package database.

Worst case scenario, you get a 404 error and have to -Syu to install the package. Unless they use -Sy, without -Su shortly after.

Not necessarily a partial update, it could be a system that hasn’t been updated. At least as far as we know.

-U installs a particular package, it can get you into a partial update state.

-S installs a package that is listed in the local package database. If necessary it downloads it first.

pacman requests the filename, which includes the version, so when a package is updated the filename changes. If the filename doesn’t exist then you get a 404 (file not found) error.

If that happens you need to update your local database, best done using -Syu which will also update the system.

If you only update the database, and then install an updated package you are in a partial update.

You know that :grin: I know that - but it is not reasonable to assume that everybody else does too.

When you are familiar with your system - you can do what ever you want - and you know what happens - that includes

pacman -S <pkgname>

I think that we shouldn’t gloss over the details, it’s not that complicated.

People learn from what we write, we should teach them properly.

1 Like

I agree to a point, so I’d rephrase that:

Those that are open to learn, do so by listening to others. Or read. So tell those that want too know. Because speaking to those that don’t has the same effect as trying to get a brick wall to breathe.

1 Like

I agree…walls should breathe. :grin:

1 Like

I don’t know why they don’t. I mean, they can talk to you…

1 Like

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