You are not logged in.
Pages: 1
I accidentally deleted sync and local directories in /var/lib/pacman, because I thought it will redownload them after. So now I can neither download nor update. I tried to install pacutils package to restore db from pacman.log, but as you may think it also not an option. How to restore db? Help me, please.
Offline
I accidentally deleted sync and local directories in /var/lib/pacman, because I thought it will redownload them after. So now I can neither download nor update.
What happens if you try to download or update? Please post the exact commands used along with the full output. Thanks.
Here's an example from my system to show what I mean:
archie:~$ doas rm -rf /var/lib/pacman/*
archie:~$ doas pacman -Syu
:: Synchronising package databases...
gnome-unstable 45.0 B 125 B/s 00:00 [-----------------------------------] 100%
testing 29.9 KiB 1107 KiB/s 00:00 [-----------------------------------] 100%
core 152.8 KiB 3.73 MiB/s 00:00 [-----------------------------------] 100%
extra 1719.3 KiB 8.00 MiB/s 00:00 [-----------------------------------] 100%
community-testing 42.6 KiB 2.45 MiB/s 00:00 [-----------------------------------] 100%
community 7.2 MiB 8.35 MiB/s 00:01 [-----------------------------------] 100%
multilib-testing 4.9 KiB 378 KiB/s 00:00 [-----------------------------------] 100%
multilib 161.2 KiB 5.08 MiB/s 00:00 [-----------------------------------] 100%
:: Starting full system upgrade...
there is nothing to do
archie:~$ ls /var/lib/pacman/
local sync
archie:~$Deleting those files doesn't seem to break anything for me anyway.
Jin, Jîyan, Azadî
Offline
Euler-Maskerony wrote:I accidentally deleted sync and local directories in /var/lib/pacman, because I thought it will redownload them after. So now I can neither download nor update.
What happens if you try to download or update? Please post the exact commands used along with the full output. Thanks.
Here's an example from my system to show what I mean:
archie:~$ doas rm -rf /var/lib/pacman/* archie:~$ doas pacman -Syu :: Synchronising package databases... gnome-unstable 45.0 B 125 B/s 00:00 [-----------------------------------] 100% testing 29.9 KiB 1107 KiB/s 00:00 [-----------------------------------] 100% core 152.8 KiB 3.73 MiB/s 00:00 [-----------------------------------] 100% extra 1719.3 KiB 8.00 MiB/s 00:00 [-----------------------------------] 100% community-testing 42.6 KiB 2.45 MiB/s 00:00 [-----------------------------------] 100% community 7.2 MiB 8.35 MiB/s 00:01 [-----------------------------------] 100% multilib-testing 4.9 KiB 378 KiB/s 00:00 [-----------------------------------] 100% multilib 161.2 KiB 5.08 MiB/s 00:00 [-----------------------------------] 100% :: Starting full system upgrade... there is nothing to do archie:~$ ls /var/lib/pacman/ local sync archie:~$Deleting those files doesn't seem to break anything for me anyway.
Now you should post something like "pacman -Q"' to see if you still have a local package database.
Offline
~ » sudo pacman -Syyu
:: Synchronizing package databases...
core 152.8 KiB 108 KiB/s 00:01 [#############################] 100%
extra 1719.3 KiB 1653 KiB/s 00:01 [#############################] 100%
community 7.2 MiB 3.45 MiB/s 00:02 [#############################] 100%
multilib 161.2 KiB 1008 KiB/s 00:00 [#############################] 100%
:: Starting full system upgrade...
there is nothing to do
~ » ls /var/lib/pacman
local sync
~ » ls /var/lib/pacman/local
ALPM_DB_VERSION pacutils-0.11.1-1Here is the problem. pacman thinks there are no packages.
Offline
archie:~$ pacman -Q|grep -c .
921
archie:~$![]()
Jin, Jîyan, Azadî
Offline
/var/lib/pacman/sync is downloaded again, but /var/lib/pacman/local is a record of all the packages installed on the local system. Removing the latter will cause pacman to think *nothing* is installed to the local system, so when you next try to install a package (that is already present), you will be informed that there are conflicting files.
I assume you are trying to follow https://wiki.archlinux.org/title/Pacman … l_database in which case please elaborate on "I tried to install pacutils package to restore db from pacman.log, but as you may think it also not an option.", what happens when you try to install pacutils?
Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD
Making lemonade from lemons since 2015.
Offline
/
I assume you are trying to follow https://wiki.archlinux.org/title/Pacman … l_database in which case please elaborate on "I tried to install pacutils package to restore db from pacman.log, but as you may think it also not an option.", what happens when you try to install pacutils?
It tries to install all dependencies which are already installed.
I have already figured it out and installed pacutils without dependencies. Now I'm following these instructions, but I have empty files.list file and file pkglist full of packages names. What am I doing wrong?
Offline
I assume you are trying to follow https://wiki.archlinux.org/title/Pacman … l_database in which case please elaborate on "I tried to install pacutils package to restore db from pacman.log, but as you may think it also not an option.", what happens when you try to install pacutils?
Wait, something happening. I think I am downloading packages. Seems like everything is ok.
Offline
Update the local database so that packages that are not required by any other package are marked as explicitly installed and the other as dependences. You will need to be extra careful in the future when removing packages, but with the original database lost, it is the best we can do.
Can somebody explain me, what does it mean? What I should be aware of while deleting packages?
Offline
Packages can be either 'explicitly installed' or 'installed as a dependency'. Packages which are marked as the latter are treated as orphans if nothing requires them, and so will be included in the `pacman -Qtd` output as candidates for removal. You should check this output and use `pacman -D --asexplicit` to mark any packages that you want to remain installed if you clear out your orphaned packages.
Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD
Making lemonade from lemons since 2015.
Offline
Can package originally installed explicitly later be marked as dependency?
I have ttf-dejavu-2.37+18+g9b5d1b2f-3 marked as orphaned within pacman -Qqd but if I remember correct I did install it manually.
Ukrainian
Offline
Can package originally installed explicitly later be marked as dependency?
I have ttf-dejavu-2.37+18+g9b5d1b2f-3 marked as orphaned within pacman -Qqd but if I remember correct I did install it manually.
You aren't specifying the --unrequired (-t) flag, so you're just listing all the packages on your system that are dependencies. Packages can be both explicitly installed and a dependency of another package.
But yes, you can change the installation reason for explicitly installed packages as well. AFAIK the install reason will not change unless you explicitly use the --database (-D) flag with the corresponding option, however.
See pacman's manpage for more details.
Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD
Making lemonade from lemons since 2015.
Offline
The question was a little different. I mean I know that ttf-dejavu marked as dependency for now. I can confirm that. But I'm pretty confident I installed it manually because it's a family of fonts.
So is it possible that package for some reason change state from explicitly installed to the dependency state without my interaction?
Ukrainian
Offline
AFAIK the install reason will not change unless you explicitly use the --database (-D) flag with the corresponding option, however.
This isn't entirely correct -- I forgot that you can also set the install reason (using --asexplicit or --asdepends) during --sync (-S) and --upgrade (-U) operations too.
I certainly wouldn't expect an explicitly installed package to change to 'installed as a dependency' under any other circumstances.
Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD
Making lemonade from lemons since 2015.
Offline
archie:~$ pacman -Q|grep -c . 921 archie:~$
Dafuq? Where does pacman -Q look up its stuff?
Offline
Sorry Awebb, I only deleted the database in an ephemeral systemd-nspawn container. Just winding up the OP really. Sorry again. I'll shut up now.
Jin, Jîyan, Azadî
Offline
The question was a little different. I mean I know that ttf-dejavu marked as dependency for now. I can confirm that. But I'm pretty confident I installed it manually because it's a family of fonts.
Why should its being a family of fonts mean you installed it manually? ttf-dejavu is highly likely to have been installed as a dependency. Certainly it is installed as a dependency on my system. (Other packages could satisfy the same dependency, but ttf-dejavu is a common option.)
CLI Paste | How To Ask Questions
Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L
Offline
Pages: 1