You are not logged in.

#1 2021-12-20 17:14:33

werewolf_65
Member
From: Nepal
Registered: 2018-04-23
Posts: 29

[SOLVED]Pacman doesn't recognize and update already installed packages

I first noticed the problem weeks ago when I updated the pacman mirrorlist due to some issues. Mostly when I would update or install something, it would give a list of 'File already exist in the filesystem' error and I thought it was normal so I would overwrite the changes with '--overwrite "*" ' option. Now I'm concerned by the thing that the

pacman -Syu

command won't update the packages automatically and would give the 'Nothing to do' message. For the applications, it wouldn't give the updates or even 'the package is already installed. reinstalling.."  warning message. The best I could do is manually install the application with

pacman -S <package-name>

command and overwrite the existing files. This really seems to be a concern. Help is much appreciated!

Last edited by werewolf_65 (2021-12-21 03:55:04)

Offline

#2 2021-12-20 17:18:28

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: [SOLVED]Pacman doesn't recognize and update already installed packages

Don't post screenshots of text output, paste the actual text.

Change your miror.


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#3 2021-12-20 17:22:35

Scimmia
Fellow
Registered: 2012-09-01
Posts: 11,553

Re: [SOLVED]Pacman doesn't recognize and update already installed packages

What does `pacman -Q` list?

Offline

#4 2021-12-21 01:18:16

werewolf_65
Member
From: Nepal
Registered: 2018-04-23
Posts: 29

Re: [SOLVED]Pacman doesn't recognize and update already installed packages

jasonwryan wrote:

Don't post screenshots of text output, paste the actual text.

Change your miror.

The screenshot is just to show an example that linux-lts hasn't been updated. (Thought it'd be clearer this way)

And yes I changed my mirror but didn't solve the problem.

Offline

#5 2021-12-21 01:18:50

werewolf_65
Member
From: Nepal
Registered: 2018-04-23
Posts: 29

Re: [SOLVED]Pacman doesn't recognize and update already installed packages

Scimmia wrote:

What does `pacman -Q` list?

http://ix.io/3J07

Offline

#6 2021-12-21 01:24:55

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: [SOLVED]Pacman doesn't recognize and update already installed packages

werewolf_65 wrote:
jasonwryan wrote:

Don't post screenshots of text output, paste the actual text.

Change your miror.

The screenshot is just to show an example that linux-lts hasn't been updated. (Thought it'd be clearer this way).

It's not clearer: it's harder to read and it is a waste of bandwidth: fix it. https://wiki.archlinux.org/title/Genera … s_and_code


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#7 2021-12-21 01:41:05

werewolf_65
Member
From: Nepal
Registered: 2018-04-23
Posts: 29

Re: [SOLVED]Pacman doesn't recognize and update already installed packages

It's not clearer: it's harder to read and it is a waste of bandwidth: fix it. https://wiki.archlinux.org/title/Genera … s_and_code

Ok fixed it.

Offline

#8 2021-12-21 01:46:06

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: [SOLVED]Pacman doesn't recognize and update already installed packages

You don't have a kernel in pacman's db?! Please paste the output, in full, of `pacman -Syu --debug` (use code tags or a paste service).


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#9 2021-12-21 01:53:22

Xyne
Administrator/PM
Registered: 2008-08-03
Posts: 6,963
Website

Re: [SOLVED]Pacman doesn't recognize and update already installed packages

werewolf_65 wrote:

I first noticed the problem weeks ago when I updated the pacman mirrorlist due to some issues.

What issues? Which mirror?

werewolf_65 wrote:

Mostly when I would update or install something, it would give a list of 'File already exist in the filesystem' error and I thought it was normal so I would overwrite the changes with '--overwrite "*" ' option.

Nope, that's not normal at all. You somehow lost your local database which tracks the installed files. The fact that your posted package list lacks the "linux" package or another kernel is problematic.

When you were having trouble with the mirrorlist, did you remove /var/lib/pacman/local while trying to force it to refresh the databases?


My Arch Linux StuffForum EtiquetteCommunity Ethos - Arch is not for everyone

Offline

#10 2021-12-21 01:58:23

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,525
Website

Re: [SOLVED]Pacman doesn't recognize and update already installed packages

Everything that pacman lists as installed appears up to date.  But some packages that are installed are not registering in pacman's db.  This is in line with the reported previous symptom(s):

werewolf_65 wrote:

Mostly when I would update or install something, it would give a list of 'File already exist in the filesystem' error and I thought it was normal so I would overwrite the changes with '--overwrite "*" ' option.

This does not seem likely to be the result of a one-off error that corrupted the db, but rather a recurring issue with it.  The most likely cause of this would likely be a bad / failing disk ... but generally there'd be other obvious signs of problems if this were the case.  Either way, have you ran a SMART test on the drive?


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Online

#11 2021-12-21 02:07:17

werewolf_65
Member
From: Nepal
Registered: 2018-04-23
Posts: 29

Re: [SOLVED]Pacman doesn't recognize and update already installed packages

jasonwryan wrote:

You don't have a kernel in pacman's db?! Please paste the output, in full, of `pacman -Syu --debug` (use code tags or a paste service).

http://ix.io/3J0b

Offline

#12 2021-12-21 02:11:23

werewolf_65
Member
From: Nepal
Registered: 2018-04-23
Posts: 29

Re: [SOLVED]Pacman doesn't recognize and update already installed packages

Xyne wrote:
werewolf_65 wrote:

I first noticed the problem weeks ago when I updated the pacman mirrorlist due to some issues.

What issues? Which mirror?

werewolf_65 wrote:

Mostly when I would update or install something, it would give a list of 'File already exist in the filesystem' error and I thought it was normal so I would overwrite the changes with '--overwrite "*" ' option.

Nope, that's not normal at all. You somehow lost your local database which tracks the installed files. The fact that your posted package list lacks the "linux" package or another kernel is problematic.

When you were having trouble with the mirrorlist, did you remove /var/lib/pacman/local while trying to force it to refresh the databases?

Now I remember. I think I deleted /var/lib/pacman/local when I faced the first mirror problem. It was in the global mirror , I think 'evowise'. I believe it was out of sync or something and pacman updates weren't working. Then, I searched to update the best mirrors and later relied on reflector to do the job. Now, after getting this error, I deleted reflector and manually assigned the mirrors again. (closer to my region )

Offline

#13 2021-12-21 02:12:19

werewolf_65
Member
From: Nepal
Registered: 2018-04-23
Posts: 29

Re: [SOLVED]Pacman doesn't recognize and update already installed packages

Trilby wrote:

Everything that pacman lists as installed appears up to date.  But some packages that are installed are not registering in pacman's db.  This is in line with the reported previous symptom(s):

werewolf_65 wrote:

Mostly when I would update or install something, it would give a list of 'File already exist in the filesystem' error and I thought it was normal so I would overwrite the changes with '--overwrite "*" ' option.

This does not seem likely to be the result of a one-off error that corrupted the db, but rather a recurring issue with it.  The most likely cause of this would likely be a bad / failing disk ... but generally there'd be other obvious signs of problems if this were the case.  Either way, have you ran a SMART test on the drive?


No i haven't run the test. But, I had to do a fsck on my /home disk recently.

Last edited by werewolf_65 (2021-12-21 02:12:55)

Offline

#14 2021-12-21 02:16:05

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,525
Website

Re: [SOLVED]Pacman doesn't recognize and update already installed packages

Ah, you can forget the drive issue suggestion - if you deleted the whole database directory, that'd explain all the symptoms much more cleanly ... I just assumed one would have mentioned such a drastic measure.

https://wiki.archlinux.org/title/Pacman … l_database


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Online

#15 2021-12-21 03:54:25

werewolf_65
Member
From: Nepal
Registered: 2018-04-23
Posts: 29

Re: [SOLVED]Pacman doesn't recognize and update already installed packages

Trilby wrote:

Ah, you can forget the drive issue suggestion - if you deleted the whole database directory, that'd explain all the symptoms much more cleanly ... I just assumed one would have mentioned such a drastic measure.

https://wiki.archlinux.org/title/Pacman … l_database

Thanks a bunch. My bad for not realizing this. Have a good day everyone!

Offline

#16 2021-12-21 04:28:23

Xyne
Administrator/PM
Registered: 2008-08-03
Posts: 6,963
Website

Re: [SOLVED]Pacman doesn't recognize and update already installed packages

For future reference, if you want to force pacman to refresh the downloaded sync databases, you can run "pacman -Syyu".


My Arch Linux StuffForum EtiquetteCommunity Ethos - Arch is not for everyone

Offline

#17 2021-12-21 08:26:57

werewolf_65
Member
From: Nepal
Registered: 2018-04-23
Posts: 29

Re: [SOLVED]Pacman doesn't recognize and update already installed packages

Xyne wrote:

For future reference, if you want to force pacman to refresh the downloaded sync databases, you can run "pacman -Syyu".

Sure!

Offline

Board footer

Powered by FluxBB