Is there any type of cleanup to do after a broken install

I ve asked myself this question several times after an install has gone awry. Below is a good example:

[g@g-x ~]$ yay losslesscut-git R
1 aur/losslesscut-git 3.60.0.r75.gdaaa2c6-1 (+1 0.87)
The swiss army knife of lossless video/audio editing.Using system-wide ffmpeg.
==> Packages to install (eg: 1 2 3, 1-3 or ^4)
==> 1
AUR Explicit (1): losslesscut-git-3.60.0.r75.gdaaa2c6-1
AUR Make Dependency (1): nvm-0.39.7-1
Sync Dependency (1): electron27-27.3.4-1
Sync Make Dependency (2): gendesk-1.0.9-3, yarn-1.22.21-1
:: (1/2) Downloaded PKGBUILD: losslesscut-git
:: (2/2) Downloaded PKGBUILD: nvm
2 losslesscut-git (Build Files Exist)
1 nvm (Build Files Exist)
==> Packages to cleanBuild?
==> [N]one [A]ll [Ab]ort [I]nstalled [No]tInstalled or (1 2 3, 1-3, ^4)
==>
2 losslesscut-git (Build Files Exist)
1 nvm (Build Files Exist)
==> Diffs to show?
==> [N]one [A]ll [Ab]ort [I]nstalled [No]tInstalled or (1 2 3, 1-3, ^4)
==>
==> Making package: losslesscut-git 3.60.0.r75.gdaaa2c6-1 (Thu 07 Mar 2024 10:47:45 PM)
==> Retrieving sources…
→ Cloning losslesscut.git git repo…
Cloning into bare repository ‘/home/g/.cache/yay/losslesscut-git/losslesscut.git’…
remote: Enumerating objects: 13838, done.
remote: Counting objects: 100% (3821/3821), done.
remote: Compressing objects: 100% (462/462), done.
remote: Total 13838 (delta 3535), reused 3539 (delta 3351), pack-reused 10017
Receiving objects: 100% (13838/13838), 18.52 MiB | 7.34 MiB/s, done.
Resolving deltas: 100% (9769/9769), done.
→ Found losslesscut.sh
==> WARNING: Skipping verification of source file PGP signatures.
==> Validating source files with sha256sums…
losslesscut.git … Skipped
losslesscut.sh … Passed
==> Making package: nvm 0.39.7-1 (Thu 07 Mar 2024 10:47:50 PM)
==> Retrieving sources…
→ Downloading nvm-0.39.7.tar.gz…
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:–:-- --:–:-- --:–:-- 0
100 322k 0 322k 0 0 557k 0 --:–:-- --:–:-- --:–:-- 557k
→ Found init-nvm.sh
→ Found install-nvm-exec
==> WARNING: Skipping verification of source file PGP signatures.
==> Validating source files with sha256sums…
nvm-0.39.7.tar.gz … Passed
init-nvm.sh … Passed
install-nvm-exec … Passed
:: Remove make dependencies after install? [y/N]
:: (1/2) Parsing SRCINFO: nvm
:: (2/2) Parsing SRCINFO: losslesscut-git
[sudo] password for g:
resolving dependencies…
looking for conflicting packages…

Package (3) New Version Net Change Download Size

extra/electron27 27.3.4-1 213.30 MiB 62.55 MiB
extra/gendesk 1.0.9-3 6.40 MiB 2.20 MiB
extra/yarn 1.22.21-1 19.26 MiB 3.40 MiB

Total Download Size: 68.16 MiB
Total Installed Size: 238.96 MiB

:: Proceed with installation? [Y/n]
:: Retrieving packages…
gendesk-1.0.9-3-x86_64 2.2 MiB 2.20 MiB/s 00:01 [-------------------------------------] 100%
yarn-1.22.21-1-any 3.4 MiB 2.72 MiB/s 00:01 [-------------------------------------] 100%
electron27-27.3.4-1-x86_64.pkg.tar.zst failed to download
Total (3/3) 68.2 MiB 11.7 MiB/s 00:06 [-------------------------------------] 100%
error: failed retrieving file ‘electron27-27.3.4-1-x86_64.pkg.tar.zst’ from arch.hu.fo : The requested URL returned error: 404
error: failed retrieving file ‘electron27-27.3.4-1-x86_64.pkg.tar.zst’ from mirror.hackingand.coffee : The requested URL returned error: 404
error: failed retrieving file ‘electron27-27.3.4-1-x86_64.pkg.tar.zst’ from mirror.rackspace.com : The requested URL returned error: 404
error: failed retrieving file ‘electron27-27.3.4-1-x86_64.pkg.tar.zst’ from archmirror1.octyl.net : The requested URL returned error: 404
error: failed retrieving file ‘electron27-27.3.4-1-x86_64.pkg.tar.zst’ from mirrors.ocf.berkeley.edu : The requested URL returned error: 404
error: failed retrieving file ‘electron27-27.3.4-1-x86_64.pkg.tar.zst’ from ord.mirror.rackspace.com : The requested URL returned error: 404
error: failed retrieving file ‘electron27-27.3.4-1-x86_64.pkg.tar.zst’ from dfw.mirror.rackspace.com : The requested URL returned error: 404
error: failed retrieving file ‘electron27-27.3.4-1-x86_64.pkg.tar.zst’ from iad.mirror.rackspace.com : The requested URL returned error: 404
error: failed retrieving file ‘electron27-27.3.4-1-x86_64.pkg.tar.zst’ from mirror.lty.me : The requested URL returned error: 404
error: failed retrieving file ‘electron27-27.3.4-1-x86_64.pkg.tar.zst’ from mirror.theash.xyz : 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.
→ Failed to install layer, rolling up to next layer.error:error installing repo packages
resolving dependencies…
looking for conflicting packages…

Package (3) New Version Net Change Download Size

extra/electron27 27.3.4-1 213.30 MiB 62.55 MiB
extra/gendesk 1.0.9-3 6.40 MiB
extra/yarn 1.22.21-1 19.26 MiB

Total Download Size: 62.55 MiB
Total Installed Size: 238.96 MiB

:: Proceed with installation? [Y/n]
:: Retrieving packages…
electron27-27.3.4-1-x86_64.pkg.tar.zst failed to download
error: failed retrieving file ‘electron27-27.3.4-1-x86_64.pkg.tar.zst’ from arch.hu.fo : The requested URL returned error: 404
error: failed retrieving file ‘electron27-27.3.4-1-x86_64.pkg.tar.zst’ from mirror.hackingand.coffee : The requested URL returned error: 404
error: failed retrieving file ‘electron27-27.3.4-1-x86_64.pkg.tar.zst’ from mirror.rackspace.com : The requested URL returned error: 404
error: failed retrieving file ‘electron27-27.3.4-1-x86_64.pkg.tar.zst’ from archmirror1.octyl.net : The requested URL returned error: 404
error: failed retrieving file ‘electron27-27.3.4-1-x86_64.pkg.tar.zst’ from mirrors.ocf.berkeley.edu : The requested URL returned error: 404
error: failed retrieving file ‘electron27-27.3.4-1-x86_64.pkg.tar.zst’ from ord.mirror.rackspace.com : The requested URL returned error: 404
error: failed retrieving file ‘electron27-27.3.4-1-x86_64.pkg.tar.zst’ from dfw.mirror.rackspace.com : The requested URL returned error: 404
error: failed retrieving file ‘electron27-27.3.4-1-x86_64.pkg.tar.zst’ from iad.mirror.rackspace.com : The requested URL returned error: 404
error: failed retrieving file ‘electron27-27.3.4-1-x86_64.pkg.tar.zst’ from mirror.lty.me : The requested URL returned error: 404
error: failed retrieving file ‘electron27-27.3.4-1-x86_64.pkg.tar.zst’ from mirror.theash.xyz : 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.
→ error installing repo packages
error installing repo packages

At this point I wonder if there are files/packages somewhere maybe in cache, or some in temp folder, that will serve no purpose, and maybe reap havoc for a future process. I see it states that no files or packages were upgraded, but does the failed install initiate a cleanup of the install attempt?

Try this:

  1. update your system fully before installing any packages: sudo pacman -Syu

  2. if the issue persists, refresh your mirrorlist(s), update your system before installing any package

1 Like

OK, but assume it s all updated. What about a broken install? Is there anything I need to cleanup after a broken instance like that?

From what I see in the output, the whole process was aborted in an error because nothing could be retrieved from the mirrors. So nothing downloaded, installed, upgraded. Nothing broken.

You could however always clean up your package cache from time to time if you so wish:

https://wiki.archlinux.org/title/Pacman#Cleaning_the_package_cache

1 Like

If your initial inquiry has been answered to your satisfaction and you have resolved your issue, please mark the relevant post leading to the solution as such for the topic to close and for the future generations with similar problem to find the solution more easily.

In case of the contrary, feel free to pose your further questions to the forum.

1 Like

When you install something from the AUR with yay this is what happens:

yay downloads the PKGBUILD file (a script containing the instructions how to make a package), and the source (either code, or compiled binaries) to ~/.cache/yay. Everything is download there, nothing is installed on your system. Then it checks whether there are any build dependencies, packages necessary to build the package you’re installing. If there are, it installs them, normally.

It then runs the script locally to build a package, the result of which is an archive with an extension .zst. Then this package is installed normally on the system. If there are dependencies for this new package, they are also installed, if not already present on the system.

So, if a package wasn’t built successfully, depending on the point where the build failed, there could be remnants of its build in ~/.cache/yay. You can go in there manually and remove what you don’t want. There could also be unnecessary build dependencies installed, they will be listed as orphans in the printout of pacman -Qdt, and you can remove them with yay -Yc.

1 Like

Sure. I get it. It wasn t my intention to drop the ball. How I solved the problem was to select a different losslesscut submission in aur. I initially chose, losslesscut-git, (the one that was most reciently updated.) It had the error. When that didn t work I chose (losslesscut-bin). It had no error, so that s what I went with.

Not a very glamorous solution for future generations, but it worked for me. In this case, (for posterity sake), I would refer future generations to the link you provided,

Between,

paccache -r, paccache -rk1, paccache -ruk0

I was able to free up 2.3 GB of space.

The response from Kresimer:

Kresimirfrog

13h

When you install something from the AUR with yay this is what happens:

yay downloads the PKGBUILD file (a script containing the instructions how to make a package), and the source (either code, or compiled binaries) to ~/.cache/yay. Everything is download there, nothing is installed on your system. Then it checks whether there are any build dependencies, packages necessary to build the package you’re installing. If there are, it installs them, normally.

It then runs the script locally to build a package, the result of which is an archive with an extension .zst. Then this package is installed normally on the system. If there are dependencies for this new package, they are also installed, if not already present on the system.

So, if a package wasn’t built successfully, depending on the point where the build failed, there could be remnants of its build in ~/.cache/yay. You can go in there manually and remove what you don’t want. There could also be unnecessary build dependencies installed, they will be listed as orphans in the printout of pacman -Qdt, and you can remove them with yay -Yc.

was more inline with the type of answer I was looking for. All in all though, every response was helpful to one degree or another, so much appreciated everyone.

1 Like

Result from
pacman -Qdt

[g@g-x ~]$ pacman -Qdt
asciidoc 10.2.0-4
audacious-plugins 4.3.1-2
blueprint-compiler 0.10.0-1
boost 1.83.0-5
chrpath 0.17-1
cmake 3.28.3-1
cmocka 1.1.7-1
conan 2.1.0-1
db 6.2.32-1
ffnvcodec-headers 12.1.14.0-1
flatpak-builder 1.4.2-1
ghostpcl 10.02.1-1
ghostxps 10.02.1-1
gptfdisk 1.0.10-1
graphicsmagick 1.3.42-3
haskell-hls-brittany-plugin 1.1.0.0-154
haskell-hls-haddock-comments-plugin 1.1.1.0-146
haskell-hls-tactics-plugin 1.8.0.0-150
itstool 1:2.0.7-1
js102 102.15.0-1
kitty-shell-integration 0.31.0-1
kitty-terminfo 0.31.0-1
ldns 1.8.3-2
lib2geom-git 1.1.r64.gce546c43-1
libgnomekbd 1:3.28.1-1
libical 3.0.17-2
libmagick6 6.9.13.7-1
libpng12 1.2.59-2
llvm14 14.0.6-3
losslesscut-bin-debug 3.59.1-1
lua52 5.2.4-6
mangohud-git-debug 0.7.1.r22.g83af57a-1
nasm 2.16.01-1
ndctl 78-1
nlohmann-json 3.11.2-2
opencl-headers 2:2023.04.17-2
python-exceptiongroup 1.2.0-1
python-freezegun 1.4.0-1
qt5-imageformats 5.15.12+kde+r10-1
re2 1:20240301-1
sassc 3.6.2-4
sdl2_gfx 1:1.0.4-3
sdl2_image 2.8.2-4
sdl2_mixer 2.8.0-1
sdl2_net 1:2.2.0-1
sdl2_ttf 2.22.0-1
spdlog 1.13.0-1
spirv-cross 2023.10.16-1
tepl 1:6.8.0-3
tinycompress 1.2.11-1
vdirsyncer 0.19.2-1
wayland-protocols 1.33-1
webrtc-audio-processing 0.3.1-4

Is it safe to remove these items?

Yes, it’s safe, but whether you should is a question only you can answer. Go through the list and see if there is anything you want to keep.

You can mark those with

pacman -S --asexplicit <package name>

so they will no longer be listed as orphans.

For example cmake is almost certainly a build dependency of some AUR package. If you remove it, it will get automatically installed the next time you update that AUR package.

If you don’t care about that

yay -Yc

will remove all of them.

It s interesting that I get a larger list of files on terminal confirmation.

[g@g-x ~]$ yay -Yc
[sudo] password for g:
checking dependencies…
:: dracut optionally requires elfutils: strip binaries to reduce initramfs size
:: glances optionally requires python-bottle: web server support
:: openal optionally requires fluidsynth: MIDI rendering
:: python-dnspython optionally requires python-requests-toolbelt: DoH support
:: vlc optionally requires fluidsynth: FluidSynth based MIDI playback plugin
:: vlc optionally requires lirc: lirc control

Package (119) Old Version Net Change

confuse 3.3-4 -0.14 MiB
elfutils 0.191-1 -3.47 MiB
fluidsynth 2.3.4-1 -0.70 MiB
libftdi 1.5-5 -0.53 MiB
libinstpatch 1.1.6-2 -1.16 MiB
libusb-compat 0.1.8-1 -0.04 MiB
lirc 1:0.10.2-3 -3.73 MiB
python-bottle 0.12.25-4 -0.76 MiB
python-requests-toolbelt 1.0.0-1 -0.46 MiB
asciidoc 10.2.0-4 -2.41 MiB
audacious-plugins 4.3.1-2 -6.85 MiB
blueprint-compiler 0.10.0-1 -1.11 MiB
boost 1.83.0-5 -178.93 MiB
breezy 3.3.5-1 -61.72 MiB
chrpath 0.17-1 -0.07 MiB
cmake 3.28.3-1 -72.06 MiB
cmocka 1.1.7-1 -0.14 MiB
conan 2.1.0-1 -6.49 MiB
cppdap 1.58.0-1 -1.62 MiB
db 6.2.32-1 -7.16 MiB
ffnvcodec-headers 12.1.14.0-1 -0.41 MiB
flatpak-builder 1.4.2-1 -0.49 MiB
ghostpcl 10.02.1-1 -38.50 MiB
ghostxps 10.02.1-1 -38.28 MiB
gptfdisk 1.0.10-1 -0.69 MiB
graphicsmagick 1.3.42-3 -13.91 MiB
gsl 2.7.1-3 -4.38 MiB
gtest 1.14.0-1 -2.14 MiB
haskell-atomic-primops 0.8.5-4 -0.08 MiB
haskell-brittany 0.14.0.2-107 -10.19 MiB
haskell-butcher 1.3.3.2-337 -0.98 MiB
haskell-czipwith 1.0.1.4-3 -0.08 MiB
haskell-data-tree-print 0.1.0.2-146 -0.06 MiB
haskell-deque 0.4.4.1-26 -0.45 MiB
haskell-generic-lens 2.2.2.0-41 -0.42 MiB
haskell-generic-lens-core 2.2.1.0-3 -0.94 MiB
haskell-ghc-source-gen 0.4.4.0-7 -0.58 MiB
haskell-hls-brittany-plugin 1.1.0.0-154 -0.19 MiB
haskell-hls-haddock-comments-plugin 1.1.1.0-146 -0.21 MiB
haskell-hls-tactics-plugin 1.8.0.0-150 -6.38 MiB
haskell-hyphenation 0.8.2-157 -2.66 MiB
haskell-indexed-profunctors 0.1.1.1-2 -0.48 MiB
haskell-microlens 0.4.13.1-2 -0.26 MiB
haskell-microlens-th 0.4.3.14-3 -0.37 MiB
haskell-monad-memo 0.5.4-79 -0.64 MiB
haskell-multistate 0.8.0.4-75 -2.08 MiB
haskell-refinery 0.4.0.0-174 -0.59 MiB
haskell-strict-list 0.1.7.4-18 -0.23 MiB
haskell-unagi-chan 0.4.1.4-84 -0.65 MiB
haskell-unsafe 0.0-20 -0.02 MiB
iniparser 4.1-5 -0.04 MiB
itstool 1:2.0.7-1 -0.09 MiB
js102 102.15.0-1 -66.89 MiB
jsoncpp 1.9.5-2 -0.73 MiB
kitty-shell-integration 0.31.0-1 -0.08 MiB
kitty-terminfo 0.31.0-1 0.00 MiB
ldns 1.8.3-2 -1.88 MiB
lib2geom-git 1.1.r64.gce546c43-1 -2.00 MiB
libcddb 1.3.2-7 -0.15 MiB
libcue 2.3.0-1 -0.04 MiB
libgedit-amtk 5.8.0-2 -0.64 MiB
libgedit-gtksourceview 299.0.5-1 -5.43 MiB
libgnomekbd 1:3.28.1-1 -0.69 MiB
libical 3.0.17-2 -7.14 MiB
libmagick6 6.9.13.7-1 -19.42 MiB
libpng12 1.2.59-2 -0.54 MiB
librsync 1:2.3.4-1 -0.10 MiB
libsass 3.6.6-1 -2.18 MiB
libsidplayfp 2.6.0-1 -0.53 MiB
libtraceevent 1:1.8.2-1 -0.43 MiB
libtracefs 1.8.0-1 -0.38 MiB
libxklavier 5.4-5 -0.36 MiB
llvm14 14.0.6-3 -56.22 MiB
llvm14-libs 14.0.6-3 -112.39 MiB
losslesscut-bin-debug 3.59.1-1 -15.92 MiB
lua52 5.2.4-6 -0.98 MiB
mangohud-git-debug 0.7.1.r22.g83af57a-1 -89.36 MiB
nasm 2.16.01-1 -3.23 MiB
ndctl 78-1 -0.96 MiB
nlohmann-json 3.11.2-2 -0.98 MiB
opencl-headers 2:2023.04.17-2 -0.37 MiB
opusfile 0.12-3 -0.20 MiB
python-aiohttp 3.9.3-1 -3.16 MiB
python-aiosignal 1.3.1-5 -0.03 MiB
python-aiostream 0.5.2-1 -0.36 MiB
python-atomicwrites 1.4.1-3 -0.04 MiB
python-click-log 0.4.0-3 -0.02 MiB
python-configobj 5.0.8-4 -0.42 MiB
python-distro 1.9.0-1 -0.20 MiB
python-dulwich 0.21.7-1 -6.91 MiB
python-exceptiongroup 1.2.0-1 -0.14 MiB
python-fastbencode 0.2-2 -0.14 MiB
python-fasteners 0.19-1 -0.17 MiB
python-freezegun 1.4.0-1 -0.15 MiB
python-frozenlist 1.4.1-1 -0.16 MiB
python-merge3 0.0.14-2 -0.08 MiB
python-multidict 6.0.4-2 -0.17 MiB
python-patch-ng 1.17.4-3 -0.16 MiB
python-patiencediff 0.2.14-2 -0.17 MiB
python-pluginbase 1.0.1-0 -0.06 MiB
python-pyjwt 2.8.0-1 -0.27 MiB
python-yarl 1.9.4-1 -0.33 MiB
qt5-imageformats 5.15.12+kde+r10-1 -0.20 MiB
re2 1:20240301-1 -0.39 MiB
rhash 1.4.4-1 -0.32 MiB
rpmextract 1.0-9 0.00 MiB
sassc 3.6.2-4 -0.02 MiB
sdl2_gfx 1:1.0.4-3 -0.09 MiB
sdl2_image 2.8.2-4 -0.19 MiB
sdl2_mixer 2.8.0-1 -0.30 MiB
sdl2_net 1:2.2.0-1 -0.06 MiB
sdl2_ttf 2.22.0-1 -0.16 MiB
spdlog 1.13.0-1 -0.66 MiB
spirv-cross 2023.10.16-1 -14.32 MiB
tepl 1:6.8.0-3 -2.14 MiB
tinycompress 1.2.11-1 -0.09 MiB
vdirsyncer 0.19.2-1 -0.73 MiB
wayland-protocols 1.33-1 -0.55 MiB
webrtc-audio-processing 0.3.1-4 -0.80 MiB

Total Removed Size: 901.39 MiB

:: Do you want to remove these packages? [Y/n]

It makes me wonder if those are really orphans, or

yay -Yc

has multiple sources. Could these added files be from

~/.cache/yay

It’s normal. Because one orphan can depend on another, so that other is technically not an orphan if something depends on it. But as you remove the orphan, those dependencies become orphans, too.

yay -Yc

Does it recursively for all orphans.

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