Weird situation where pacman thinks I have no packages installed

I don’t know what I did, but pacman thinks I have no packages installed.

pacman -Q returns


When I try to install a package this happens:

A few of my last zsh history entries:

For anyone wondering what is “./”


When I try to upgrade:

1 Like

It looks as if your /var/lib/pacman/local has been deleted or corrupted somehow.

Signs that pacman needs a local database restoration:

  • pacman -Q gives absolutely no output, and pacman -Syu erroneously reports that the system is up to date.
  • When trying to install a package using pacman -S package, and it outputs a list of already satisfied dependencies.


1 Like

I almost did it but I encountered some errors while following the instructions on the wiki:

[root@vadym-swiftsf31442 ~]# pacman -Sy
:: Synchronizing package databases...
 endeavouros is up to date
 core-testing is up to date
 core is up to date
 extra-testing is up to date
 extra is up to date
 multilib-testing is up to date
 multilib is up to date
 home_bespokesynth_Arch                                                            1770.0   B  13.0 KiB/s 00:00 [------------------------------------------------------------------] 100%
[root@vadym-swiftsf31442 ~]# recovery-pacman -U $(< files.list)
error: no targets specified (use -h for help)
[root@vadym-swiftsf31442 ~]# recovery-pacman -S $(< pkglist)
resolving dependencies...
:: There are 2 providers available for DEEPIN-ANYTHING-MODULE:
:: Repository extra
   1) deepin-anything-arch  2) deepin-anything-dkms

Enter a number (default=1):
looking for conflicting packages...
error: unresolvable package conflicts detected
error: failed to prepare transaction (conflicting dependencies)
:: intel-oneapi-common and intel-oneapi-basekit are in conflict
[root@vadym-swiftsf31442 ~]#

BTW, I think the files.list file is empty.

The pkglist file is on pastebin: https//******

This is the list for locally available packages. It may be the that there are none in your case.

That’s more like it.

You would need to keep either one or the other. Remove one and proceed with:

I did remove one of them when I tried first time but there’s more conflicts and I tried again.
And why are there intel packages if I use an amd processor?

I can’t tell that. Perhaps they got installed as dependencies for some packages you installed before.

What is the current situation?
Please post the whole of the terminal output.

I think I removed all the conflicts but there’s still an error.
The output is on pastebin:

  • Total Download Size: 17000.96 MiB

  • Total Installed Size: 56246.11 MiB

  • :: Proceed with installation? [Y/n]

  • error: Partition / too full: 4358825 blocks needed, 3449916 blocks free

  • error: failed to commit transaction (not enough free disk space)

  • Errors occurred, no packages were upgraded.

I can’t possibly go through each and every package you have on that list but 17 GB download size and 56 GB installed size? That sounds rather excessive and you don’t have enough space for that.

I could not possibly free up that much space! What do I do?

Also Arch wiki says:

Rest of options will allow pacman to operate without reading/writing filesystem.

Why does it say that it needs to free up space?

Do you really have all those packages installed? That is a huge number of packages. It isn’t impossible that you have that many but that is much more than would be typical.

Can you share the output of which recovery-pacman

[root@vadym-swiftsf31442 ~]# which recovery-pacman
which: no recovery-pacman in (/root...

I guess that doesn’t work in bash.

Try this: declare -f recovery-pacman

The recovery-pacman command I’m running is a bash function that I defined:

 recovery-pacman() {
    pacman "$@"  \
    --log /dev/null   \
    --noscriptlet     \
    --dbonly          \
    --overwrite "*"   \
    --nodeps          \
[root@vadym-swiftsf31442 ~]# declare -f recovery-pacman
recovery-pacman ()
    pacman "$@" --log /dev/null --noscriptlet --dbonly --overwrite "*" --nodeps --needed

Wouldn’t having that many packages corrupt @Flame package file:

I mean that many packages seems to be more than an overflow can handle trying to load at one time. I guess a lot depends on processor and memory as well though. However that much seems very excessive

I deleted a massive file of arount 16.5 GB (baloo index) and now I have 30 GB of free space.

Filesystem      Size  Used Avail Use% Mounted on
/dev/nvme0n1p2  225G  184G   30G  87% /

I will now retry the command.

Run sudo pacman -Scc as well to clean up your pacman cache.
It could free up some GBs as weel.

But remember:

Total Download Size: 17000.96 MiB
Total Installed Size: 56246.11 MiB


PS. If nothing else works, I would personally backup my personal data under home directory (including the dot files and folders) and reinstall the system from the latest ISO.

Did you follow the instructions in the Arch wiki about using pacman-recovery -U before pacman-recovery -S?

I would definitely not remove the entire cache. That will make the download size bigger as it will need to redownload all those packages.