Yay update interrupted due to power failure

Hi,

I had a power failure as I was updating my system today. As a result, I’ve got a few packages broken. Re-installing doesn’t help. I get error message that xxx already exist in my filesystem.

What can I do?

Below is part of the error I’m getting when re-installing libreoffice-fresh

libreoffice-fresh: /usr/share/metainfo/libreoffice-calc.appdata.xml exists in filesystem
libreoffice-fresh: /usr/share/metainfo/libreoffice-draw.appdata.xml exists in filesystem
libreoffice-fresh: /usr/share/metainfo/libreoffice-impress.appdata.xml exists in filesystem
libreoffice-fresh: /usr/share/metainfo/libreoffice-writer.appdata.xml exists in filesystem
libreoffice-fresh: /usr/share/metainfo/org.libreoffice.kde.metainfo.xml exists in filesystem
libreoffice-fresh: /usr/share/mime/packages/libreoffice.xml exists in filesystem
libreoffice-fresh: /usr/share/templates/.source/soffice.odg exists in filesystem
libreoffice-fresh: /usr/share/templates/.source/soffice.odp exists in filesystem
libreoffice-fresh: /usr/share/templates/.source/soffice.ods exists in filesystem
libreoffice-fresh: /usr/share/templates/.source/soffice.odt exists in filesystem
libreoffice-fresh: /usr/share/templates/soffice.odg.desktop exists in filesystem
libreoffice-fresh: /usr/share/templates/soffice.odp.desktop exists in filesystem
libreoffice-fresh: /usr/share/templates/soffice.ods.desktop exists in filesystem
libreoffice-fresh: /usr/share/templates/soffice.odt.desktop exists in filesystem

sudo pacman -Rdd libreoffice-fresh

1 Like

I get:

[romko@newfolio ~]$ sudo pacman -Rdd libreoffice-fresh
error: target not found: libreoffice-fresh

You need more work to solve it :sad_but_relieved_face: but is easy

sudo rm -R /usr/share/metainfo/libreoffice-calc.appdata.xml /usr/share/metainfo/libreoffice-draw.appdata.xml /usr/share/metainfo/libreoffice-impress.appdata.xml /usr/share/metainfo/libreoffice-writer.appdata.xml /usr/share/metainfo/org.libreoffice.kde.metainfo.xml /usr/share/mime/packages/libreoffice.xml /usr/share/templates/.source/soffice.odg /usr/share/templates/.source/soffice.odp /usr/share/templates/.source/soffice.ods /usr/share/templates/.source/soffice.odt /usr/share/templates/soffice.odg.desktop /usr/share/templates/soffice.odp.desktop /usr/share/templates/soffice.ods.desktop /usr/share/templates/soffice.odt.desktop

You need to do the same to every package in same situation, 1st try sudo pacman -Rdd

1 Like

weird coincidences for people who don’t believe in coincidences:

YAY: I am staring at a big update but Libre is not in it.

Five minutes ago I opened a Libre office document and a popup asked to me manually update LibreOffice…I never do what any app asks me to do. I wait for Arch.

I did not have power failure. Oddly, I did last night I did with the ISP in a monsoon.

I can roll with weirdness but I always note it.

Thank you so much!!! It has worked!!!

Discovered I had this issue with calibre and nano.


memo for myself or anyone else in this situation

  1. set the number of lines in terminal to unlimited

  2. save content with errors as a text file, fine/replace unnecessary text

  3. copy text to Firefox search tab to get rid of paragraphs

  4. do sudo rm -R [copy paste from Firefox bar]

  5. yay packagename

To check what other packages were upgraded

awk '$1 ~ "2025-08-24" && $3 == "upgraded" { print $4; }' /var/log/pacman.log
1 Like

You can install check-broken-packages-pacman-hook-git

It informs in every upgrade if some thing is missing

1 Like

Why not just use the “overwrite” option of pacman/yay/paru:

--overwrite <glob>
Bypass file conflict checks and overwrite conflicting files. If the package that is about to be installed contains files that are already installed and match *glob*, this option will cause all those files to be overwritten. Using *--overwrite* will not allow overwriting a directory with a file or installing packages with conflicting files and directories. Multiple patterns can be specified by separating them with a comma. May be specified multiple times. Patterns can be negated, such that files matching them will not be overwritten, by prefixing them with an exclamation mark. Subsequent matches will override previous ones. A leading literal exclamation mark or backslash needs to be escaped.

Example:

yay -Syu --overwrite '*'

That’s The “I don’t care” way. If possible, I would avoid using it.
jonathon faq guide contains a another way.

Generally avoid using the --overwrite option with pacman. The --overwrite option takes an argument containing a glob. When used, pacman will bypass file conflict checks for files that match the glob. In a properly maintained system, it should only be used when explicitly recommended by the Arch Developers. Avoid_certain_pacman_commands

Side node with paccheck and pacrepairdb might have a type can do a lot..

Sudo pacrepairdb wil fix it xd some casez

Edit: fixes my own typo pacrepairdb xd

I assume you meant pacrepairdb instead of pacrebuilddb?

1 Like

Heh yeah sorry…. Pacrepairdb ….mijn brains keep remembering pacrebuilddb weird is it… pacrepairdb

Sudo paccheck --listbroken –sha256sum

Do see if more packages is broken xd nvm are nice tools from pacutils

1 Like

Here in this thread it was recommended to a “rm -R …” on all those files. From my point of view that is certainly more risky than just using the overwrite option.

I think it depends on how you use it.

yay -Syu --overwrite '*'

  • yay -Syu: Synchronizes package databases and upgrades all system packages.

  • --overwrite '*': Tells pacman to forcibly overwrite all conflicting files on the filesystem, regardless of why those files conflict.

The entire update gets the right to overwrite all conflicting files. In my opinion, dangerous.

yay -S $PACKAGE --overwrite '*'

Only $PACKAGE will be installed with overwrite.

1 Like

Yes, ok. But back to this thread here the update only complains about files from libreoffice-fresh. In that case it doesnt matter if you do

yay -S libreoffice-fresh --overwrite '*'

or

yay -Syu --overwrite '*'

At the end it is the same operation.

I don’t know if it was necessarily the last package that pacman was updating. And possible AUR updates as well. I also thought about those, who end up on this page when looking for help with a similar problem.

1 Like

Never do yay -Syu –overwrite

Thats bad , sudo pacrepairdb , wil fix from database..from cache…

Never do overwrite with -Syu

1 Like

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