Fail to update and now cannot use (517 to 518)

make sense, here it is:
mhwd-kernel -l && mhwd-kernel -li

error: failed to initialize alpm library:
(root: /, dbpath: /var/lib/pacman/)
could not find or read directory
error: failed to initialize alpm library:
(root: /, dbpath: /var/lib/pacman/)
could not find or read directory
Currently running: 5.15.60-1-MANJARO (linux515)
The following kernels are installed in your system:
error: failed to initialize alpm library:
(root: /, dbpath: /var/lib/pacman/)
could not find or read directory
error: failed to initialize alpm library:
(root: /, dbpath: /var/lib/pacman/)
could not find or read directory

and

[manjaro /]# mhwd-kernel -i linux519
error: failed to initialize alpm library:
(root: /, dbpath: /var/lib/pacman/)
could not find or read directory
error: failed to initialize alpm library:
(root: /, dbpath: /var/lib/pacman/)
could not find or read directory
error: failed to initialize alpm library:
(root: /, dbpath: /var/lib/pacman/)
could not find or read directory
Error: Please make sure if the given kernel(s) exist(s).
available kernels:

Alright… makes sense now… but for any reason there is no database…

Please run inside the chroot (meaning: run it after manjaro-chroot):

sudo pacman -Syyuu

yeah I tried this with the same error

error: failed to initialize alpm library:
(root: /, dbpath: /var/lib/pacman/)
could not find or read directory

Please check the dir:

ls -la /
total 112
drwxr-xr-x  18 root root  4096 Jun 16 10:17 .
drwxr-xr-x  18 root root  4096 Jun 16 10:17 ..
-rw-r--r--   1 root root     8 Apr 16 00:17 .manjaro-tools
lrwxrwxrwx   1 root root     7 Jun  9 02:53 bin -> usr/bin
drwxr-xr-x   5 root root  4096 Oct  6 21:53 boot
-rw-r--r--   1 root root 21285 Apr 16 00:17 desktopfs-pkgs.txt
drwxr-xr-x  21 root root  4640 Oct  6 23:25 dev
drwxr-xr-x 115 root root 12288 Oct  6 20:45 etc
drwxr-xr-x   3 root root  4096 Sep  2 18:11 home
-rw-r--r--   1 root root    55 May 23 13:35 install-type
lrwxrwxrwx   1 root root     7 Jun  9 02:53 lib -> usr/lib
lrwxrwxrwx   1 root root     7 Jun  9 02:53 lib64 -> usr/lib
drwx------   2 root root 16384 May 21 17:23 lost+found
drwxr-xr-x   2 root root  4096 Dec 18  2021 mnt
drwxr-xr-x  11 root root  4096 Sep  2 18:06 opt
dr-xr-xr-x 439 root root     0 Oct  6 23:56 proc
drwxr-x---  10 root root  4096 Sep  6 18:57 root
-rw-r--r--   1 root root  5143 Apr 16 00:10 rootfs-pkgs.txt
drwxr-xr-x   2 root root    40 Oct  6 23:56 run
lrwxrwxrwx   1 root root     7 Jun  9 02:53 sbin -> usr/bin
lrwxrwxrwx   1 root root    19 May 21 19:21 snap -> /var/lib/snapd/snap
drwxr-xr-x   4 root root  4096 Apr 16 00:09 srv
dr-xr-xr-x  13 root root     0 Oct  6 21:46 sys
drwxr-xr-x   9 root root  4096 Oct  5 22:02 timeshift
drwxrwxrwt   2 root root    40 Oct  6 23:56 tmp
drwxr-xr-x  12 root root  4096 Oct  6 19:49 usr
drwxr-xr-x   9 root root  4096 Oct  6 23:47 var

is this expected?

and saw from another post, the output of pacman-mirrors --fasttrack 5 && pacman -Syyu is

::INFO Downloading mirrors from Manjaro
::INFO => Mirror pool: https://repo.manjaro.org/mirrors.json
::INFO => Mirror status: https://repo.manjaro.org/status.json
::INFO Using default mirror file
::INFO Querying mirrors - This may take some time
  2.484 Czechia        : https://mirror.dkm.cz/manjaro/
  1.490 MENA           : https://mirror.arvancloud.com/manjaro/
  1.536 United_States  : https://mirror.math.princeton.edu/pub/manjaro/
  2.965 New_Zealand    : https://mirror.2degrees.nz/manjaro/
  2.247 Switzerland    : https://mirror.init7.net/manjaro/
::INFO Writing mirror list
::MENA            : https://mirror.arvancloud.com/manjaro/stable
::United_States   : https://mirror.math.princeton.edu/pub/manjaro/stable
::Switzerland     : https://mirror.init7.net/manjaro/stable
::Czechia         : https://mirror.dkm.cz/manjaro/stable
::New_Zealand     : https://mirror.2degrees.nz/manjaro/stable
::INFO Mirror list generated and saved to: /etc/pacman.d/mirrorlist
error: failed to initialize alpm library:
(root: /, dbpath: /var/lib/pacman/)
could not find or read directory

also note that the output of mhwd-kernel -li

Currently running: 5.15.60-1-MANJARO (linux515)
The following kernels are installed in your system:
error: failed to initialize alpm library:
(root: /, dbpath: /var/lib/pacman/)
could not find or read directory
error: failed to initialize alpm library:
(root: /, dbpath: /var/lib/pacman/)
could not find or read directory

which is supposed to be 5.18 in the partition? I only have 5.15 in live usb

There is something wrong with pacman…

whoami
pacman --debug -Syyuu

root and

debug: pacman v6.0.1 - libalpm v13.0.1
debug: config: attempting to read file /etc/pacman.conf
debug: config: new section 'options'
debug: config: CacheDir: /var/cache/pacman/pkg/
debug: config: HoldPkg: pacman
debug: config: HoldPkg: glibc
debug: config: HoldPkg: manjaro-system
debug: config: SyncFirst: manjaro-system
debug: config: SyncFirst: archlinux-keyring
debug: config: SyncFirst: manjaro-keyring
debug: config: Architecture: auto
debug: config: arch: x86_64
debug: config: SigLevel: Required
debug: config: SigLevel: DatabaseOptional
debug: config: LocalFileSigLevel: Optional
debug: config: new section 'core'
debug: config: SigLevel: PackageRequired
debug: config file /etc/pacman.conf, line 78: including /etc/pacman.d/mirrorlist
debug: config: new section 'extra'
debug: config: SigLevel: PackageRequired
debug: config file /etc/pacman.conf, line 82: including /etc/pacman.d/mirrorlist
debug: config: new section 'community'
debug: config: SigLevel: PackageRequired
debug: config file /etc/pacman.conf, line 86: including /etc/pacman.d/mirrorlist
debug: config: new section 'multilib'
debug: config: SigLevel: PackageRequired
debug: config file /etc/pacman.conf, line 93: including /etc/pacman.d/mirrorlist
debug: config: new section 'pritunl'
debug: config: finished parsing /etc/pacman.conf
debug: setup_libalpm called
error: failed to initialize alpm library:
(root: /, dbpath: /var/lib/pacman/)
could not find or read directory
cat /etc/pacman.conf
ls -ladR /var/lib/pacman/*

Btw…

Is that your personal repo?

#
# /etc/pacman.conf
#
# See the pacman.conf(5) manpage for option and repository directives

#
# GENERAL OPTIONS
#
[options]
# The following paths are commented out with their default values listed.
# If you wish to use different paths, uncomment and update the paths.
#RootDir     = /
#DBPath      = /var/lib/pacman/
CacheDir = /var/cache/pacman/pkg/
#LogFile     = /var/log/pacman.log
#GPGDir      = /etc/pacman.d/gnupg/
#HookDir     = /etc/pacman.d/hooks/
HoldPkg      = pacman glibc manjaro-system
# If upgrades are available for these packages they will be asked for first
SyncFirst    = manjaro-system archlinux-keyring manjaro-keyring
#XferCommand = /usr/bin/curl -L -C - -f -o %o %u
#XferCommand = /usr/bin/wget --passive-ftp -c -O %o %u
#CleanMethod = KeepInstalled
#UseDelta    = 0.7
Architecture = auto

#IgnorePkg   =
#IgnorePkg   =
#IgnoreGroup =

#NoUpgrade   =
#NoExtract   =

# Misc options
#UseSyslog
#Color
#NoProgressBar
# We cannot check disk space from within a chroot environment
CheckSpace
#VerbosePkgLists
#ParallelDownloads = 5

# By default, pacman accepts packages signed by keys that its local keyring
# trusts (see pacman-key and its man page), as well as unsigned packages.
SigLevel    = Required DatabaseOptional
LocalFileSigLevel = Optional
#RemoteFileSigLevel = Required

# NOTE: You must run `pacman-key --init` before first using pacman; the local
# keyring can then be populated with the keys of all official Manjaro Linux
# packagers with `pacman-key --populate archlinux manjaro`.

#
# REPOSITORIES
#   - can be defined here or included from another file
#   - pacman will search repositories in the order defined here
#   - local/custom mirrors can be added here or in separate files
#   - repositories listed first will take precedence when packages
#     have identical names, regardless of version number
#   - URLs will have $repo replaced by the name of the current repo
#   - URLs will have $arch replaced by the name of the architecture
#
# Repository entries are of the format:
#       [repo-name]
#       Server = ServerName
#       Include = IncludePath
#
# The header [repo-name] is crucial - it must be present and
# uncommented to enable the repo.
#

# The testing repositories are disabled by default. To enable, uncomment the
# repo name header and Include lines. You can add preferred servers immediately
# after the header, and they will be used before the default mirrors.

[core]
SigLevel = PackageRequired
Include = /etc/pacman.d/mirrorlist

[extra]
SigLevel = PackageRequired
Include = /etc/pacman.d/mirrorlist

[community]
SigLevel = PackageRequired
Include = /etc/pacman.d/mirrorlist

# If you want to run 32 bit applications on your x86_64 system,
# enable the multilib repositories as required here.

[multilib]
SigLevel = PackageRequired
Include = /etc/pacman.d/mirrorlist

# An example of a custom package repository.  See the pacman manpage for
# tips on creating your own repositories.
#[custom]
#SigLevel = Optional TrustAll
#Server = file:///home/custompkgs

[pritunl]
Server = https://repo.pritunl.com/stable/pacman
ls: cannot access '/var/lib/pacman/*': No such file or directory

I think it is just for the vpn of an institute

Guess you deleted the folder?

mkdir -pv /var/lib/pacman/
stat /var/lib/pacman/
pacman --debug -Syyuu

I have no idea if I deleted that…

  File: /var/lib/pacman/
  Size: 4096      	Blocks: 8          IO Block: 4096   directory
Device: 259,5	Inode: 13377563    Links: 2
Access: (0755/drwxr-xr-x)  Uid: (    0/    root)   Gid: (    0/    root)
Access: 2022-10-07 00:23:12.946866570 -0500
Modify: 2022-10-07 00:23:12.946866570 -0500
Change: 2022-10-07 00:23:12.946866570 -0500
 Birth: 2022-10-07 00:23:12.946866570 -0500

this seems working good?

debug: pacman v6.0.1 - libalpm v13.0.1
debug: config: attempting to read file /etc/pacman.conf
debug: config: new section 'options'
debug: config: CacheDir: /var/cache/pacman/pkg/
debug: config: HoldPkg: pacman
debug: config: HoldPkg: glibc
debug: config: HoldPkg: manjaro-system
debug: config: SyncFirst: manjaro-system
debug: config: SyncFirst: archlinux-keyring
debug: config: SyncFirst: manjaro-keyring
debug: config: Architecture: auto
debug: config: arch: x86_64
debug: config: SigLevel: Required
debug: config: SigLevel: DatabaseOptional
debug: config: LocalFileSigLevel: Optional
debug: config: new section 'core'
debug: config: SigLevel: PackageRequired
debug: config file /etc/pacman.conf, line 78: including /etc/pacman.d/mirrorlist
debug: config: new section 'extra'
debug: config: SigLevel: PackageRequired
debug: config file /etc/pacman.conf, line 82: including /etc/pacman.d/mirrorlist
debug: config: new section 'community'
debug: config: SigLevel: PackageRequired
debug: config file /etc/pacman.conf, line 86: including /etc/pacman.d/mirrorlist
debug: config: new section 'multilib'
debug: config: SigLevel: PackageRequired
debug: config file /etc/pacman.conf, line 93: including /etc/pacman.d/mirrorlist
debug: config: new section 'pritunl'
debug: config: finished parsing /etc/pacman.conf
debug: setup_libalpm called
debug: option 'logfile' = /var/log/pacman.log
debug: option 'gpgdir' = /etc/pacman.d/gnupg/
debug: option 'hookdir' = /etc/pacman.d/hooks/
debug: option 'cachedir' = /var/cache/pacman/pkg/
debug: registering sync database 'core'
debug: database path for tree core set to /var/lib/pacman/sync/core.db
debug: "/var/lib/pacman/sync/core.db" is not readable: No such file or directory
debug: setting usage of 15 for core repository
debug: adding new server URL to database 'core': https://mirror.arvancloud.com/manjaro/stable/core/x86_64
debug: adding new server URL to database 'core': https://mirror.math.princeton.edu/pub/manjaro/stable/core/x86_64
debug: adding new server URL to database 'core': https://mirror.init7.net/manjaro/stable/core/x86_64
debug: adding new server URL to database 'core': https://mirror.dkm.cz/manjaro/stable/core/x86_64
debug: adding new server URL to database 'core': https://mirror.2degrees.nz/manjaro/stable/core/x86_64
debug: registering sync database 'extra'
debug: database path for tree extra set to /var/lib/pacman/sync/extra.db
debug: "/var/lib/pacman/sync/extra.db" is not readable: No such file or directory
debug: setting usage of 15 for extra repository
debug: adding new server URL to database 'extra': https://mirror.arvancloud.com/manjaro/stable/extra/x86_64
debug: adding new server URL to database 'extra': https://mirror.math.princeton.edu/pub/manjaro/stable/extra/x86_64
debug: adding new server URL to database 'extra': https://mirror.init7.net/manjaro/stable/extra/x86_64
debug: adding new server URL to database 'extra': https://mirror.dkm.cz/manjaro/stable/extra/x86_64
debug: adding new server URL to database 'extra': https://mirror.2degrees.nz/manjaro/stable/extra/x86_64
debug: registering sync database 'community'
debug: database path for tree community set to /var/lib/pacman/sync/community.db
debug: "/var/lib/pacman/sync/community.db" is not readable: No such file or directory
debug: setting usage of 15 for community repository
debug: adding new server URL to database 'community': https://mirror.arvancloud.com/manjaro/stable/community/x86_64
debug: adding new server URL to database 'community': https://mirror.math.princeton.edu/pub/manjaro/stable/community/x86_64
debug: adding new server URL to database 'community': https://mirror.init7.net/manjaro/stable/community/x86_64
debug: adding new server URL to database 'community': https://mirror.dkm.cz/manjaro/stable/community/x86_64
debug: adding new server URL to database 'community': https://mirror.2degrees.nz/manjaro/stable/community/x86_64
debug: registering sync database 'multilib'
debug: database path for tree multilib set to /var/lib/pacman/sync/multilib.db
debug: "/var/lib/pacman/sync/multilib.db" is not readable: No such file or directory
debug: setting usage of 15 for multilib repository
debug: adding new server URL to database 'multilib': https://mirror.arvancloud.com/manjaro/stable/multilib/x86_64
debug: adding new server URL to database 'multilib': https://mirror.math.princeton.edu/pub/manjaro/stable/multilib/x86_64
debug: adding new server URL to database 'multilib': https://mirror.init7.net/manjaro/stable/multilib/x86_64
debug: adding new server URL to database 'multilib': https://mirror.dkm.cz/manjaro/stable/multilib/x86_64
debug: adding new server URL to database 'multilib': https://mirror.2degrees.nz/manjaro/stable/multilib/x86_64
debug: registering sync database 'pritunl'
debug: database path for tree pritunl set to /var/lib/pacman/sync/pritunl.db
debug: "/var/lib/pacman/sync/pritunl.db" is not readable: No such file or directory
debug: setting usage of 15 for pritunl repository
debug: adding new server URL to database 'pritunl': https://repo.pritunl.com/stable/pacman
:: Synchronizing package databases...
debug: database dir '/var/lib/pacman/sync/' does not exist, creating it
 core downloading...
 extra downloading...
 community downloading...
 multilib downloading...
 pritunl downloading...
debug: core.db: url is https://mirror.arvancloud.com/manjaro/stable/core/x86_64/core.db
debug: core.db: maxsize 134217728
debug: core.db: opened tempfile for download: /var/lib/pacman/sync/core.db.part (wb)
debug: core.db: curl returned result 0 from transfer
debug: core.db: response code 200
debug: core.db.tar.gz.sig: url is https://mirror.arvancloud.com/manjaro/stable/core/x86_64/core.db.tar.gz.sig
debug: core.db.tar.gz.sig: maxsize 16384
debug: core.db.tar.gz.sig: opened tempfile for download: /var/lib/pacman/sync/core.db.tar.gz.sig.part (wb)
debug: core.db.tar.gz.sig: curl returned result 0 from transfer
debug: core.db.tar.gz.sig: response code 404
debug: core.db.tar.gz.sig: no more servers to retry
debug: extra.db: url is https://mirror.arvancloud.com/manjaro/stable/extra/x86_64/extra.db
debug: extra.db: maxsize 134217728
debug: extra.db: opened tempfile for download: /var/lib/pacman/sync/extra.db.part (wb)
debug: extra.db: curl returned result 0 from transfer
debug: extra.db: response code 200
debug: extra.db.tar.gz.sig: url is https://mirror.arvancloud.com/manjaro/stable/extra/x86_64/extra.db.tar.gz.sig
debug: extra.db.tar.gz.sig: maxsize 16384
debug: extra.db.tar.gz.sig: opened tempfile for download: /var/lib/pacman/sync/extra.db.tar.gz.sig.part (wb)
debug: extra.db.tar.gz.sig: curl returned result 0 from transfer
debug: extra.db.tar.gz.sig: response code 404
debug: extra.db.tar.gz.sig: no more servers to retry
debug: community.db: url is https://mirror.arvancloud.com/manjaro/stable/community/x86_64/community.db
debug: community.db: maxsize 134217728
debug: community.db: opened tempfile for download: /var/lib/pacman/sync/community.db.part (wb)
debug: community.db: curl returned result 0 from transfer
debug: community.db: response code 200
debug: community.db.tar.gz.sig: url is https://mirror.arvancloud.com/manjaro/stable/community/x86_64/community.db.tar.gz.sig
debug: community.db.tar.gz.sig: maxsize 16384
debug: community.db.tar.gz.sig: opened tempfile for download: /var/lib/pacman/sync/community.db.tar.gz.sig.part (wb)
debug: community.db.tar.gz.sig: curl returned result 0 from transfer
debug: community.db.tar.gz.sig: response code 404
debug: community.db.tar.gz.sig: no more servers to retry
debug: multilib.db: url is https://mirror.arvancloud.com/manjaro/stable/multilib/x86_64/multilib.db
debug: multilib.db: maxsize 134217728
debug: multilib.db: opened tempfile for download: /var/lib/pacman/sync/multilib.db.part (wb)
debug: multilib.db: curl returned result 0 from transfer
debug: multilib.db: response code 200
debug: multilib.db.tar.gz.sig: url is https://mirror.arvancloud.com/manjaro/stable/multilib/x86_64/multilib.db.tar.gz.sig
debug: multilib.db.tar.gz.sig: maxsize 16384
debug: multilib.db.tar.gz.sig: opened tempfile for download: /var/lib/pacman/sync/multilib.db.tar.gz.sig.part (wb)
debug: multilib.db.tar.gz.sig: curl returned result 0 from transfer
debug: multilib.db.tar.gz.sig: response code 404
debug: multilib.db.tar.gz.sig: no more servers to retry
debug: pritunl.db: url is https://repo.pritunl.com/stable/pacman/pritunl.db
debug: pritunl.db: maxsize 134217728
debug: pritunl.db: opened tempfile for download: /var/lib/pacman/sync/pritunl.db.part (wb)
debug: pritunl.db: curl returned result 0 from transfer
debug: pritunl.db: response code 200
debug: pritunl.db.sig: url is https://repo.pritunl.com/stable/pacman/pritunl.db.sig
debug: pritunl.db.sig: maxsize 16384
debug: pritunl.db.sig: opened tempfile for download: /var/lib/pacman/sync/pritunl.db.sig.part (wb)
debug: pritunl.db.sig: curl returned result 0 from transfer
debug: pritunl.db.sig: response code 404
debug: pritunl.db.sig: no more servers to retry
debug: curl_download_internal return code is 0
debug: "/var/lib/pacman/sync/core.db.sig" is not readable: No such file or directory
debug: sig path /var/lib/pacman/sync/core.db.sig could not be opened
debug: got error 43 at _alpm_gpgme_checksig (../lib/libalpm/signing.c: 599) : missing PGP signature
debug: missing optional signature
debug: "/var/lib/pacman/sync/extra.db.sig" is not readable: No such file or directory
debug: sig path /var/lib/pacman/sync/extra.db.sig could not be opened
debug: got error 43 at _alpm_gpgme_checksig (../lib/libalpm/signing.c: 599) : missing PGP signature
debug: missing optional signature
debug: "/var/lib/pacman/sync/community.db.sig" is not readable: No such file or directory
debug: sig path /var/lib/pacman/sync/community.db.sig could not be opened
debug: got error 43 at _alpm_gpgme_checksig (../lib/libalpm/signing.c: 599) : missing PGP signature
debug: missing optional signature
debug: "/var/lib/pacman/sync/multilib.db.sig" is not readable: No such file or directory
debug: sig path /var/lib/pacman/sync/multilib.db.sig could not be opened
debug: got error 43 at _alpm_gpgme_checksig (../lib/libalpm/signing.c: 599) : missing PGP signature
debug: missing optional signature
debug: "/var/lib/pacman/sync/pritunl.db.sig" is not readable: No such file or directory
debug: sig path /var/lib/pacman/sync/pritunl.db.sig could not be opened
debug: got error 43 at _alpm_gpgme_checksig (../lib/libalpm/signing.c: 599) : missing PGP signature
debug: missing optional signature
debug: loading package cache for repository 'local'
debug: added 0 packages to package cache for db 'local'
debug: returning error 33 from alpm_db_get_pkg (../lib/libalpm/db.c: 248) : could not find or read package
debug: returning error 33 from alpm_db_get_pkg (../lib/libalpm/db.c: 248) : could not find or read package
debug: returning error 33 from alpm_db_get_pkg (../lib/libalpm/db.c: 248) : could not find or read package
:: Starting full system upgrade...
debug: checking for package upgrades
 there is nothing to do
debug: unregistering database 'local'
debug: freeing package cache for repository 'local'
debug: unregistering database 'core'
debug: unregistering database 'extra'
debug: unregistering database 'community'
debug: unregistering database 'multilib'
debug: unregistering database 'pritunl'

yepp it works…

yup good to sudo pacman -Syyuu.

Now install the kernel as explained above…

[manjaro /]# mhwd-kernel -i linux519
:: Synchronizing package databases...
 core                  165.6 KiB  71.4 KiB/s 00:02 [######################] 100%
 extra                1955.5 KiB   156 KiB/s 00:13 [######################] 100%
 community               7.3 MiB   157 KiB/s 00:47 [######################] 100%
 multilib              175.6 KiB  49.5 KiB/s 00:04 [######################] 100%
 pritunl                 7.7 KiB  18.0 KiB/s 00:00 [######################] 100%
error: no targets specified (use -h for help)

and wired mhwd-kernel -l && mhwd-kernel -li

[manjaro /]# mhwd-kernel -l && mhwd-kernel -li
available kernels:
   * linux419
   * linux510
   * linux515
   * linux518
   * linux519
   * linux54
   * linux60
   * linux515-rt
   * linux518-rt
   * linux519-rt
Currently running: 5.15.60-1-MANJARO (linux515)
The following kernels are installed in your system:

ok… do it manually:

pacman -Syu linux519 linux519-headers linux519-nvidia
mkinitcpio -P
update-grub

error from the first

:: Synchronizing package databases...
 core is up to date
 extra is up to date
 community is up to date
 multilib is up to date
 pritunl is up to date
:: Starting full system upgrade...
resolving dependencies...
looking for conflicting packages...
warning: dependency cycle detected:
warning: bashrc-manjaro will be installed before its bash dependency
warning: dependency cycle detected:
warning: harfbuzz will be installed before its freetype2 dependency
warning: dependency cycle detected:
warning: libglvnd will be installed before its nvidia-utils dependency
warning: dependency cycle detected:
warning: mesa will be installed before its libglvnd dependency

Packages (206) acl-2.3.1-2
               adobe-source-code-pro-fonts-2.038ro+1.058it+1.018var-1
               adwaita-icon-theme-42.0+r1+gc144c3d75-1  argon2-20190702-4
               at-spi2-atk-2.38.0-1  at-spi2-core-2.44.1-1  atk-2.38.0-1
               attr-2.5.1-2  audit-3.0.8-1  avahi-0.8+22+gfd482a7-3
               bash-5.1.016-2  bashrc-manjaro-5.1.016-2  binutils-2.39-3
               brotli-1.0.9-8  bzip2-1.0.8-4  ca-certificates-20210603-1
               ca-certificates-mozilla-3.82-1  ca-certificates-utils-20210603-1
               cairo-1.17.6-2  cantarell-fonts-1:0.303.1-1  coreutils-9.1-1
               cryptsetup-2.5.0-1  curl-7.85.0-1  dbus-1.14.0-1  dconf-0.40.0-1
               desktop-file-utils-0.26-2  device-mapper-2.03.16-2
               diffutils-3.8-1  duktape-2.7.0-4  e2fsprogs-1.46.5-4
               egl-wayland-2:1.1.11-2  eglexternalplatform-1.1-2  expat-2.4.8-1
               file-5.42-2  filesystem-2022.06.08-3  findutils-4.9.0-1
               fontconfig-2:2.14.0-1  freetype2-2.12.1-1  fribidi-1.0.12-1
               gawk-5.1.1-1  gcc-libs-12.2.0-1  gdbm-1.23-1
               gdk-pixbuf2-2.42.9-1  glib-networking-1:2.72.2-1  glib2-2.72.3-3
               glibc-2.36-3  gmp-6.2.1-2  gnutls-3.7.7-3  graphite-1:1.3.14-2
               grep-3.7-1  gsettings-desktop-schemas-42.0-1
               gtk-update-icon-cache-1:4.6.7-1  gtk3-1:3.24.34-1  gzip-1.12-1
               harfbuzz-5.1.0-1  hicolor-icon-theme-0.17-2  hwdata-0.361-1
               iana-etc-20220715-1  icu-71.1-1  iptables-1:1.8.8-2
               iso-codes-4.11.0-1  jansson-2.14-2  json-c-0.16-1
               json-glib-1.6.6-2  kbd-2.5.1-1  keyutils-1.6.3-1  kmod-30-1
               krb5-1.19.3-3  lcms2-2.13.1-1  less-1:608-1  libarchive-3.6.1-2
               libcap-2.65-1  libcap-ng-0.8.3-1  libcloudproviders-0.3.1-2
               libcolord-1.4.6-1  libcups-1:2.4.2-3  libdaemon-0.14-5
               libdatrie-0.2.13-1  libdrm-2.4.113-2  libedit-20210910_3.1-1
               libelf-0.187-2  libepoxy-1.5.10-1  libevdev-1.13.0-1
               libevent-2.1.12-2  libffi-3.4.2-5  libfontenc-1.1.6-1
               libgcrypt-1.10.1-1  libglvnd-1.4.0-3  libgpg-error-1.45-2
               libgudev-237-2  libidn2-2.3.3-1  libinput-1.21.0-1
               libjpeg-turbo-2.1.4-2  libldap-2.6.3-1  libmnl-1.0.5-1
               libnetfilter_conntrack-1.0.9-1  libnfnetlink-1.0.2-1
               libnftnl-1.2.3-1  libnghttp2-1.49.0-1  libnl-3.7.0-1
               libnsl-2.0.0-2  libomxil-bellagio-0.9.3-3  libp11-kit-0.24.1-1
               libpcap-1.10.1-2  libpciaccess-0.16-4  libpng-1.6.37-3
               libproxy-0.4.18-1  libpsl-0.21.1-1  librsvg-2:2.54.5-1
               libsasl-2.1.28-1  libseccomp-2.5.4-1  libsoup-2.74.2-2
               libsoup3-3.0.8-1  libssh2-1.10.0-1  libstemmer-2.2.0-2
               libsysprof-capture-3.44.0-2  libtasn1-4.19.0-1  libthai-0.1.29-1
               libtiff-4.4.0-4  libtirpc-1.3.3-1  libunistring-1.0-1
               libunwind-1.6.2-1  libusb-1.0.26-1  libvdpau-1.5-1
               libverto-0.3.2-4  libwacom-2.4.0-1  libx11-1.8.1-3
               libxau-1.0.10-1  libxcb-1.15-1  libxcomposite-0.4.5-4
               libxcrypt-4.4.28-2  libxcursor-1.2.1-1  libxcvt-0.1.2-1
               libxdamage-1.1.5-4  libxdmcp-1.1.3-4  libxext-1.3.4-4
               libxfixes-6.0.0-1  libxfont2-2.0.6-1  libxft-2.3.5-1
               libxi-1.8-1  libxinerama-1.1.4-4  libxkbcommon-1.4.1-1
               libxkbfile-1.1.0-3  libxml2-2.10.2-2  libxnvctrl-515.65.01-1
               libxrandr-1.5.2-4  libxrender-0.9.10-5  libxshmfence-1.3-3
               libxtst-1.2.3-5  libxv-1.0.11-5  libxxf86vm-1.1.4-5
               linux-api-headers-5.18.15-1  linux-firmware-20220815.8413c63-1
               linux-firmware-whence-20220815.8413c63-1  llvm-libs-14.0.6-3
               lm_sensors-1:3.6.0.r41.g31d1f125-1  lz4-1:1.9.4-1  lzo-2.10-3
               mesa-22.1.7-1  mkinitcpio-31-2.0  mkinitcpio-busybox-1.35.0-1
               mpfr-4.1.0.p13-3  mtdev-1.1.6-2  ncurses-6.3-3  nettle-3.8.1-1
               nvidia-utils-515.65.01-3  openssl-1.1.1.q-1  p11-kit-0.24.1-1
               pahole-1:1.23-1  pam-1.5.2-1  pambase-20211210-1
               pango-1:1.50.9-1  pcre-8.45-2  pcre2-10.40-1  pixman-0.40.0-2
               popt-1.18-3  python-3.10.6-1  readline-8.1.002-1
               rest-0.8.1+r4+ge5ee6ef-1  shadow-4.11.1-1
               shared-mime-info-2.0+155+gf4e7cbc-1  sqlite-3.39.3-1
               systemd-251.4-1  systemd-libs-251.4-1  tracker3-3.3.3-1
               tzdata-2022c-1  util-linux-2.38.1-1  util-linux-libs-2.38.1-1
               vulkan-icd-loader-1.3.221-1  wayland-1.21.0-1
               xcb-proto-1.15.2-1  xf86-input-libinput-1.2.1-1
               xkeyboard-config-2.36-3  xorg-fonts-encodings-1.0.6-1
               xorg-server-21.1.4-1  xorg-server-common-21.1.4-1
               xorg-setxkbmap-1.3.3-1  xorg-xkbcomp-1.4.5-1
               xorg-xrandr-1.5.1-2  xorgproto-2022.2-1  xz-5.2.6-1
               zlib-1:1.2.12-2  zstd-1.5.2-7  linux519-5.19.7-1
               linux519-headers-5.19.7-1  linux519-nvidia-515.65.01-13

Total Download Size:    680.15 MiB
Total Installed Size:  2208.48 MiB

:: Proceed with installation? [Y/n] 
:: Retrieving packages...
 nvidia-utils-515.65.01-3-x86_64.pkg.tar.zst failed to download
 Total (  1/143)       680.1 MiB   153 MiB/s 00:04 [######################] 100%
error: failed retrieving file 'nvidia-utils-515.65.01-3-x86_64.pkg.tar.zst' from mirror.arvancloud.com : The requested URL returned error: 404
error: failed retrieving file 'nvidia-utils-515.65.01-3-x86_64.pkg.tar.zst' from mirror.math.princeton.edu : The requested URL returned error: 404
error: failed retrieving file 'nvidia-utils-515.65.01-3-x86_64.pkg.tar.zst' from mirror.init7.net : The requested URL returned error: 404
error: failed retrieving file 'nvidia-utils-515.65.01-3-x86_64.pkg.tar.zst' from mirror.dkm.cz : The requested URL returned error: 404
error: failed retrieving file 'nvidia-utils-515.65.01-3-x86_64.pkg.tar.zst' from mirror.2degrees.nz : The requested URL returned error: 404
warning: failed to retrieve some files
error: failed to commit transaction (failed to retrieve some files)
Errors occurred, no packages were upgraded.

Didn’t you do a full upgrade above? Or did you cancel it?

Update mirrors:

sudo pacman-mirrors -c Germany
sudo pacman-mirrors -f 5

Do a full upgrade first:

sudo pacman -Syyuu

then install the kernel:

pacman -Syu linux519 linux519-headers linux519-nvidia
mkinitcpio -P
update-grub
sudo: pacman-mirrror: command not found

And actually I have already done sudo pacman -Syyuu without any interruption I believe? Just in case I ran again and the output:

 core                  165.6 KiB  60.6 KiB/s 00:03 [######################] 100%
 extra                1955.5 KiB   157 KiB/s 00:12 [######################] 100%
 community               7.3 MiB   164 KiB/s 00:46 [######################] 100%
 multilib              175.6 KiB  91.5 KiB/s 00:02 [######################] 100%
 pritunl                 7.7 KiB  14.3 KiB/s 00:01 [######################] 100%
:: Starting full system upgrade...
 there is nothing to do