[FAILED] failed to start pkgfile database update

When I open my laptop, before loading the SDDM, the screen will say:
[FAILED] failed to start pkgfile database update

Do you use pkgfile? (why?)
systemctl | grep pkgfile

$ systemctl | grep pkgfile
● pkgfile-update.service      loaded failed failed    pkgfile database update                                                      
  pkgfile-update.timer        loaded active waiting   pkgfile database update timer 

So … why do you use pkgfile ?
(its not default, I dont use it, pacman has similar functionality, etc)

I have never used it, maybe it is a default in yay or AUR

If I delete that:

sudo pacman -Rsn pkgfile
错误:无法准备事务处理 (无法满足依赖关系)
:: 删除 pkgfile 破坏依赖 'pkgfile' (manjaro-zsh-config 需要)

which means manjaro-zsh config needs this

It is not.
Even installing the package (from the repo, or the -git version from AUR) wont automatically start the services for you … so you did this on purpose at some point.

I guess we can look for anything relying on pkgfile…

pactree -r pkgfile


pacman -Qi pkgfile | grep Required

maybe it is because I use oh-my-zsh as default terminal

I dont think so … that would be a very odd depend for zsh or zsh theming, etc.
Why not run one of the commands I provided so we can see if anything relies on it ?

Oh … I see your edit above contains more info.

huh. your zsh config seems to be acting funny if the grep didnt work.
In any case … yeah I saw your edit above , its not ‘oh-my-zsh’ … but it is from manjaro-zsh-config.
No idea why… oh so I looked into it.

It appears its a dep for one single function of “command-not-found.zsh”.
A whole package and a service and a timer for one action? Not something I would do.
But unless you want to modify that package or remove it … seems you are stuck with pkgfile.

In that case … you might want to manually initiate a pkgfile refresh:

sudo pkgfile -u
1 Like
(base) [11:02:04] firestar:~ $ sudo pkgfile -u         
:: Updating 4 repos...
  core is up to date
  extra is up to date
  community is up to date
  multilib is up to date

yes it is just like sudo pacman -Syyu

And on a restart do you see the same error?

I noticed that pkgfile service will lock the db from time to time. Maybe we can ping @Chrysostomus to have a look at it. :slight_smile:

It is used be manjaro-zsh-config for command not found hook. Pamac and pacman have similar functionality, but pkgfile has significantly better performance. You don’t want to have your terminal stuck for several seconds when you type in a nonexistent command. With pkgfile the results are practically instant. And for this it needs to update the files database from from time to time. The service does this in the background.

No, it is not.

when I closed my computer there still was, but when I open it again it did not show the same error

i have same issue from a fresh install of manjaro (KDE edition), i didnt even know manjaro comes with zsh. but it seems its pre installed.

can i safely remove manjaro-zsh-config? or zsh entirely? i dont want a service to be running in the backround when i dont even use zsh

If you are using bash or fish instead, then yes, you can remove it without any issues. Only gnome edition comes with zsh enabled by default.

thanks, this is the command i used

sudo pacman -Rsu manjaro-zsh-config zsh-autosuggestions zsh-completions zsh-history-substring-search zsh-syntax-highlighting zsh

seems to work fine :smiley: