Error fetching xxxx fatal: could not create work tree dir xxxx: Permission denied context: exit status 128

When I try a ‘sudo yay -Syu’ update, I get these errors. Why and how to fix it?
In advance, thank you for your kind help!

: (0/100) Downloaded PKGBUILD: python2-pyasn1
:: (0/100) Downloaded PKGBUILD: python2-zope-interface
:: (0/100) Downloaded PKGBUILD: python2-pyasn1-modules
:: (0/100) Downloaded PKGBUILD: python2-incremental
:: (0/100) Downloaded PKGBUILD: python2-service-identity
:: (0/100) Downloaded PKGBUILD: python2-constantly
:: (0/100) Downloaded PKGBUILD: python2-mistune
:: (0/100) Downloaded PKGBUILD: python2-docutils
:: (0/100) Downloaded PKGBUILD: python2-m2r
:: (0/100) Downloaded PKGBUILD: python2-graphviz
:: (0/100) Downloaded PKGBUILD: python2-automat
:: (0/100) Downloaded PKGBUILD: python2-hyperlink
:: (0/100) Downloaded PKGBUILD: python2-pyhamcrest
:: (0/100) Downloaded PKGBUILD: python2-twisted
:: (0/100) Downloaded PKGBUILD: python2-trustme
:: (0/100) Downloaded PKGBUILD: python2-urllib3
:: (0/100) Downloaded PKGBUILD: python2-pycparser
:: (0/100) Downloaded PKGBUILD: python2-tornado
:: (0/100) Downloaded PKGBUILD: python2-requests
:: (0/100) Downloaded PKGBUILD: python2-cachecontrol
:: (0/100) Downloaded PKGBUILD: python2-cffi
:: (0/100) Downloaded PKGBUILD: python2-configparser
:: (0/100) Downloaded PKGBUILD: python2-colorama
:: (0/100) Downloaded PKGBUILD: python2-enum34
:: (0/100) Downloaded PKGBUILD: python2-gobject
:: (0/100) Downloaded PKGBUILD: python2-webencodings
:: (0/100) Downloaded PKGBUILD: python2-pytest-expect
:: (0/100) Downloaded PKGBUILD: python2-u-msgpack
:: (0/100) Downloaded PKGBUILD: python2-html5lib
:: (0/100) Downloaded PKGBUILD: python2-pathlib2
:: (0/100) Downloaded PKGBUILD: python2-scandir
:: (0/100) Downloaded PKGBUILD: python2-importlib-metadata
:: (0/100) Downloaded PKGBUILD: python2-importlib_resources
:: (0/100) Downloaded PKGBUILD: python2-libxml2
:: (0/100) Downloaded PKGBUILD: python2-lockfile
:: (0/100) Downloaded PKGBUILD: python2-lxml
:: (0/100) Downloaded PKGBUILD: python2-more-itertools
:: (0/100) Downloaded PKGBUILD: python2-numpy
:: (0/100) Downloaded PKGBUILD: python2-pillow
:: (0/100) Downloaded PKGBUILD: python2-pluggy
:: (0/100) Downloaded PKGBUILD: python2-psutil
:: (0/100) Downloaded PKGBUILD: python2-py
:: (0/100) Downloaded PKGBUILD: python2-retrying
:: (0/100) Downloaded PKGBUILD: python2-wcwidth
:: (0/100) Downloaded PKGBUILD: python2-toml
:: (0/100) Downloaded PKGBUILD: python2-coverage
:: (0/100) Downloaded PKGBUILD: python2-pytest-cov
:: (0/100) Downloaded PKGBUILD: rttr
:: (0/100) Downloaded PKGBUILD: qt5-styleplugins
:: (0/100) Downloaded PKGBUILD: rclone-browser
:: (0/100) Downloaded PKGBUILD: python2-wheel
:: (0/100) Downloaded PKGBUILD: qrcp-bin
:: (0/100) Downloaded PKGBUILD: standardnotes-desktop
:: (0/100) Downloaded PKGBUILD: webcamoid-git
error: target not found: libmediawiki
error: target not found: python2-setuptools-scm
error: target not found: python2-pbr
error: target not found: python2-linecache2
error: target not found: python2-traceback2
error: target not found: python2-unittest2
error: target not found: python2-mock
error: target not found: python2-genty
error: target not found: python2-nose
error: target not found: python2-flaky
error: target not found: python2-pytest-runner
error: target not found: python2-pretend
error: target not found: python2-freezegun
error: target not found: python2-pytest-freezegun
error: target not found: python2-pytest-timeout
error: target not found: python2-backports-abc
error: target not found: python2-futures
error: target not found: python2-singledispatch
error: target not found: python2-monotonic
error: target not found: python2-pycurl
error: target not found: python2-trollius
error: target not found: python2-zope-interface
error: target not found: python2-pyasn1
error: target not found: python2-pyasn1-modules
error: target not found: python2-service-identity
error: target not found: python2-incremental
error: target not found: python2-constantly
error: target not found: python2-mistune
error: target not found: python2-docutils
error: target not found: python2-m2r
error: target not found: python2-graphviz
error: target not found: python2-automat
error: target not found: python2-hyperlink
error: target not found: python2-pyhamcrest
error: target not found: python2-twisted
error: target not found: python2-tornado
error: target not found: python2-trustme
error: target not found: python2-u-msgpack
error: target not found: python2-pytest-expect
error: target not found: python2-coverage
error: target not found: python2-pytest-cov
error: target not found: perl-xml-sax-expat
error: target not found: perl-xml-simple
error: target not found: icon-naming-utils
 -> error fetching libpdfium-nojs: fatal: could not create work tree dir 'libpdfium-nojs': Permission denied 
	 context: exit status 128

error fetching python2-setuptools-scm: fatal: could not create work tree dir 'python2-setuptools-scm': Permission denied 
	 context: exit status 128

error fetching orage: fatal: could not create work tree dir 'orage': Permission denied 
	 context: exit status 128

error fetching python2-backports: fatal: could not create work tree dir 'python2-backports': Permission denied 
	 context: exit status 128

error fetching python2-atomicwrites: fatal: could not create work tree dir 'python2-atomicwrites': Permission denied 
	 context: exit status 128

error fetching libkipi: fatal: could not create work tree dir 'libkipi': Permission denied 
	 context: exit status 128

error fetching mongodb-bin: fatal: could not create work tree dir 'mongodb-bin': Permission denied 
	 context: exit status 128

error fetching python2-backports.functools_lru_cache: fatal: could not create work tree dir 'python2-backports.functools_lru_cache': Permission denied 
	 context: exit status 128

error fetching joplin: fatal: could not create work tree dir 'joplin': Permission denied 
	 context: exit status 128

error fetching mongodb-compass: fatal: could not create work tree dir 'mongodb-compass': Permission denied 
	 context: exit status 128

error fetching python-pypdf2: fatal: could not create work tree dir 'python-pypdf2': Permission denied 
	 context: exit status 128

error fetching megasync: fatal: could not create work tree dir 'megasync': Permission denied 
	 context: exit status 128

error fetching github-desktop-bin: fatal: could not create work tree dir 'github-desktop-bin': Permission denied 
	 context: exit status 128

error fetching libquicktime: fatal: could not create work tree dir 'libquicktime': Permission denied 
	 context: exit status 128

error fetching kipi-plugins: fatal: could not create work tree dir 'kipi-plugins': Permission denied 
	 context: exit status 128

error fetching nordvpn-bin: fatal: could not create work tree dir 'nordvpn-bin': Permission denied 
	 context: exit status 128

error fetching libmediawiki: fatal: could not create work tree dir 'libmediawiki': Permission denied 
	 context: exit status 128

error fetching gnome-icon-theme: fatal: could not create work tree dir 'gnome-icon-theme': Permission denied 
	 context: exit status 128

error fetching galculator-gtk2: fatal: could not create work tree dir 'galculator-gtk2': Permission denied 
	 context: exit status 128

error fetching metadata-cleaner: fatal: could not create work tree dir 'metadata-cleaner': Permission denied 
	 context: exit status 128

error fetching networkminer: fatal: could not create work tree dir 'networkminer': Permission denied 
	 context: exit status 128

error fetching python2-soupsieve: fatal: could not create work tree dir 'python2-soupsieve': Permission denied 
	 context: exit status 128

error fetching python2-beautifulsoup4: fatal: could not create work tree dir 'python2-beautifulsoup4': Permission denied 
	 context: exit status 128

error fetching python2-msgpack: fatal: could not create work tree dir 'python2-msgpack': Permission denied 
	 context: exit status 128

error fetching python2-chardet: fatal: could not create work tree dir 'python2-chardet': Permission denied 
	 context: exit status 128

error fetching python2-pbr: fatal: could not create work tree dir 'python2-pbr': Permission denied 
	 context: exit status 128

error fetching python2-traceback2: fatal: could not create work tree dir 'python2-traceback2': Permission denied 
	 context: exit status 128

error fetching python2-linecache2: fatal: could not create work tree dir 'python2-linecache2': Permission denied 
	 context: exit status 128

error fetching python2-unittest2: fatal: could not create work tree dir 'python2-unittest2': Permission denied 
	 context: exit status 128

error fetching python2-genty: fatal: could not create work tree dir 'python2-genty': Permission denied 
	 context: exit status 128

error fetching python2-funcsigs: fatal: could not create work tree dir 'python2-funcsigs': Permission denied 
	 context: exit status 128

error fetching python2-mock: fatal: could not create work tree dir 'python2-mock': Permission denied 
	 context: exit status 128

error fetching python2-flaky: fatal: could not create work tree dir 'python2-flaky': Permission denied 
	 context: exit status 128

error fetching python2-nose: fatal: could not create work tree dir 'python2-nose': Permission denied 
	 context: exit status 128

error fetching python2-pretend: fatal: could not create work tree dir 'python2-pretend': Permission denied 
	 context: exit status 128

error fetching python2-pytest-runner: fatal: could not create work tree dir 'python2-pytest-runner': Permission denied 
	 context: exit status 128

error fetching python2-pyopenssl: fatal: could not create work tree dir 'python2-pyopenssl': Permission denied 
	 context: exit status 128

error fetching python2-freezegun: fatal: could not create work tree dir 'python2-freezegun': Permission denied 
	 context: exit status 128

error fetching python2-pytest-timeout: fatal: could not create work tree dir 'python2-pytest-timeout': Permission denied 
	 context: exit status 128

error fetching python2-pytest-freezegun: fatal: could not create work tree dir 'python2-pytest-freezegun': Permission denied 
	 context: exit status 128

error fetching python2-backports-abc: fatal: could not create work tree dir 'python2-backports-abc': Permission denied 
	 context: exit status 128

error fetching python2-futures: fatal: could not create work tree dir 'python2-futures': Permission denied 
	 context: exit status 128

error fetching python2-monotonic: fatal: could not create work tree dir 'python2-monotonic': Permission denied 
	 context: exit status 128

error fetching python2-singledispatch: fatal: could not create work tree dir 'python2-singledispatch': Permission denied 
	 context: exit status 128

error fetching python2-pycurl: fatal: could not create work tree dir 'python2-pycurl': Permission denied 
	 context: exit status 128

error fetching python2-trollius: fatal: could not create work tree dir 'python2-trollius': Permission denied 
	 context: exit status 128

error fetching python2-pyasn1: fatal: could not create work tree dir 'python2-pyasn1': Permission denied 
	 context: exit status 128

error fetching python2-zope-interface: fatal: could not create work tree dir 'python2-zope-interface': Permission denied 
	 context: exit status 128

error fetching python2-incremental: fatal: could not create work tree dir 'python2-incremental': Permission denied 
	 context: exit status 128

error fetching python2-pyasn1-modules: fatal: could not create work tree dir 'python2-pyasn1-modules': Permission denied 
	 context: exit status 128

error fetching python2-service-identity: fatal: could not create work tree dir 'python2-service-identity': Permission denied 
	 context: exit status 128

error fetching python2-constantly: fatal: could not create work tree dir 'python2-constantly': Permission denied 
	 context: exit status 128

error fetching python2-mistune: fatal: could not create work tree dir 'python2-mistune': Permission denied 
	 context: exit status 128

error fetching python2-docutils: fatal: could not create work tree dir 'python2-docutils': Permission denied 
	 context: exit status 128

error fetching python2-m2r: fatal: could not create work tree dir 'python2-m2r': Permission denied 
	 context: exit status 128

error fetching python2-graphviz: fatal: could not create work tree dir 'python2-graphviz': Permission denied 
	 context: exit status 128

error fetching python2-automat: fatal: could not create work tree dir 'python2-automat': Permission denied 
	 context: exit status 128

error fetching python2-hyperlink: fatal: could not create work tree dir 'python2-hyperlink': Permission denied 
	 context: exit status 128

error fetching python2-pyhamcrest: fatal: could not create work tree dir 'python2-pyhamcrest': Permission denied 
	 context: exit status 128

error fetching python2-twisted: fatal: could not create work tree dir 'python2-twisted': Permission denied 
	 context: exit status 128

error fetching python2-trustme: fatal: could not create work tree dir 'python2-trustme': Permission denied 
	 context: exit status 128

error fetching python2-urllib3: fatal: could not create work tree dir 'python2-urllib3': Permission denied 
	 context: exit status 128

error fetching python2-tornado: fatal: could not create work tree dir 'python2-tornado': Permission denied 
	 context: exit status 128

error fetching python2-pycparser: fatal: could not create work tree dir 'python2-pycparser': Permission denied 
	 context: exit status 128

error fetching python2-requests: fatal: could not create work tree dir 'python2-requests': Permission denied 
	 context: exit status 128

error fetching python2-cachecontrol: fatal: could not create work tree dir 'python2-cachecontrol': Permission denied 
	 context: exit status 128

error fetching python2-cffi: fatal: could not create work tree dir 'python2-cffi': Permission denied 
	 context: exit status 128

error fetching python2-configparser: fatal: could not create work tree dir 'python2-configparser': Permission denied 
	 context: exit status 128

error fetching python2-colorama: fatal: could not create work tree dir 'python2-colorama': Permission denied 
	 context: exit status 128

error fetching python2-enum34: fatal: could not create work tree dir 'python2-enum34': Permission denied 
	 context: exit status 128

error fetching python2-gobject: fatal: could not create work tree dir 'python2-gobject': Permission denied 
	 context: exit status 128

error fetching python2-webencodings: fatal: could not create work tree dir 'python2-webencodings': Permission denied 
	 context: exit status 128

error fetching python2-pytest-expect: fatal: could not create work tree dir 'python2-pytest-expect': Permission denied 
	 context: exit status 128

error fetching python2-u-msgpack: fatal: could not create work tree dir 'python2-u-msgpack': Permission denied 
	 context: exit status 128

error fetching python2-html5lib: fatal: could not create work tree dir 'python2-html5lib': Permission denied 
	 context: exit status 128

error fetching python2-pathlib2: fatal: could not create work tree dir 'python2-pathlib2': Permission denied 
	 context: exit status 128

error fetching python2-scandir: fatal: could not create work tree dir 'python2-scandir': Permission denied 
	 context: exit status 128

error fetching python2-importlib-metadata: fatal: could not create work tree dir 'python2-importlib-metadata': Permission denied 
	 context: exit status 128

error fetching python2-importlib_resources: fatal: could not create work tree dir 'python2-importlib_resources': Permission denied 
	 context: exit status 128

error fetching python2-libxml2: fatal: could not create work tree dir 'python2-libxml2': Permission denied 
	 context: exit status 128

error fetching python2-lockfile: fatal: could not create work tree dir 'python2-lockfile': Permission denied 
	 context: exit status 128

error fetching python2-lxml: fatal: could not create work tree dir 'python2-lxml': Permission denied 
	 context: exit status 128

error fetching python2-more-itertools: fatal: could not create work tree dir 'python2-more-itertools': Permission denied 
	 context: exit status 128

error fetching python2-numpy: fatal: could not create work tree dir 'python2-numpy': Permission denied 
	 context: exit status 128

error fetching python2-pillow: fatal: could not create work tree dir 'python2-pillow': Permission denied 
	 context: exit status 128

error fetching python2-pluggy: fatal: could not create work tree dir 'python2-pluggy': Permission denied 
	 context: exit status 128

error fetching python2-psutil: fatal: could not create work tree dir 'python2-psutil': Permission denied 
	 context: exit status 128

error fetching python2-py: fatal: could not create work tree dir 'python2-py': Permission denied 
	 context: exit status 128

error fetching python2-retrying: fatal: could not create work tree dir 'python2-retrying': Permission denied 
	 context: exit status 128

error fetching python2-wcwidth: fatal: could not create work tree dir 'python2-wcwidth': Permission denied 
	 context: exit status 128

error fetching python2-toml: fatal: could not create work tree dir 'python2-toml': Permission denied 
	 context: exit status 128

error fetching python2-coverage: fatal: could not create work tree dir 'python2-coverage': Permission denied 
	 context: exit status 128

error fetching python2-pytest-cov: fatal: could not create work tree dir 'python2-pytest-cov': Permission denied 
	 context: exit status 128

error fetching rttr: fatal: could not create work tree dir 'rttr': Permission denied 
	 context: exit status 128

error fetching qt5-styleplugins: fatal: could not create work tree dir 'qt5-styleplugins': Permission denied 
	 context: exit status 128

error fetching rclone-browser: fatal: could not create work tree dir 'rclone-browser': Permission denied 
	 context: exit status 128

error fetching python2-wheel: fatal: could not create work tree dir 'python2-wheel': Permission denied 
	 context: exit status 128

error fetching qrcp-bin: fatal: could not create work tree dir 'qrcp-bin': Permission denied 
	 context: exit status 128

error fetching standardnotes-desktop: fatal: could not create work tree dir 'standardnotes-desktop': Permission denied 
	 context: exit status 128

error fetching webcamoid-git: fatal: could not create work tree dir 'webcamoid-git': Permission denied 
	 context: exit status 128

First of all: don’t use sudo with yay.
And second… -runs away-

1 Like

Python 2 is end-of-life since 2,5 years. Remove everything that has this, then we can continue with the rest.
I recommend first updating everything except from the AUR. pamac update --no-aur