❯ sudo pacman -Sc
Packages to keep:
All locally installed packages
Cache directory: /var/cache/pacman/pkg/
:: Do you want to remove all other packages from cache? [Y/n] n
Database directory: /var/lib/pacman/
:: Do you want to remove unused repositories? [Y/n]
removing unused sync repositories...
See:
man pacman | less -p '-c, --clean'
SYNC OPTIONS (APPLY TO -S)
-c, --clean
Remove packages that are no longer installed from the cache as well
as currently unused sync databases to free up disk space. When
pacman downloads packages, it saves them in a cache directory. In
addition, databases are saved for every sync DB you download from
and are not deleted even if they are removed from the configuration
file pacman.conf(5). Use one --clean switch to only remove packages
that are no longer installed; use two to remove all files from the
cache. In both cases, you will have a yes or no option to remove
packages and/or unused downloaded databases.
a script “repo-clean.py” for pacman/pamac and pkgfile :
#!/usr/bin/env python
from pathlib import Path
import subprocess
repos = ['refresh_timestamp'] # exclude some files
p = subprocess.run("pacman-conf -l", capture_output=True, text=True, shell=True)
repos.extend(p.stdout.split())
print(repos[1:])
if "community" in repos:
exit(9)
dirs = (
"/var/tmp/pamac/dbs/sync/",
"/var/lib/pacman/sync/",
"/var/cache/pkgfile/"
)
removes = []
for item in dirs:
try:
for child in Path(item).iterdir():
name = child.stem.split(".", 1)[0]
if name not in repos:
#child.unlink()
removes.append(f'"{child}"')
except FileNotFoundError:
print(" # ", item, f"not exists, {item.split('/')[3]} not installed")
if removes:
print("sudo rm -I", " ".join(removes))
Hard to say as it also depends on your system config … things like pacnew or pacsave is generally created because the file is different from upstream, ie - if you made changes to grub then you get one from that update, but if you havent then you dont.
But for me … going back to May of last year …
[ALPM] warning: /etc/locale.gen installed as /etc/locale.gen.pacnew
[ALPM] warning: /etc/systemd/system.conf installed as /etc/systemd/system.conf.pacnew
[ALPM] warning: /etc/mkinitcpio.conf installed as /etc/mkinitcpio.conf.pacnew
[ALPM] warning: /etc/sudoers installed as /etc/sudoers.pacnew
[ALPM] warning: /etc/locale.gen installed as /etc/locale.gen.pacnew
[ALPM] warning: /etc/locale.gen installed as /etc/locale.gen.pacnew
[ALPM] warning: /etc/locale.gen installed as /etc/locale.gen.pacnew
[ALPM] warning: /etc/pam.d/system-login installed as /etc/pam.d/system-login.pacnew
[ALPM] warning: /etc/pam.d/passwd installed as /etc/pam.d/passwd.pacnew
[ALPM] warning: /etc/systemd/system.conf installed as /etc/systemd/system.conf.pacnew
[ALPM] warning: /etc/makepkg.conf installed as /etc/makepkg.conf.pacnew
[ALPM] warning: /etc/mkinitcpio.conf installed as /etc/mkinitcpio.conf.pacnew
[ALPM] warning: /etc/php/php.ini installed as /etc/php/php.ini.pacnew
[ALPM] warning: /etc/pacman.conf installed as /etc/pacman.conf.pacnew
[ALPM] warning: /etc/pamac.conf installed as /etc/pamac.conf.pacnew
[ALPM] warning: /etc/php/php.ini installed as /etc/php/php.ini.pacnew
[ALPM] warning: /etc/systemd/system.conf installed as /etc/systemd/system.conf.pacnew
[ALPM] warning: /etc/default/grub installed as /etc/default/grub.pacnew
[ALPM] warning: /etc/httpd/conf/httpd.conf installed as /etc/httpd/conf/httpd.conf.pacnew
[ALPM] warning: /etc/pacman.conf installed as /etc/pacman.conf.pacnew
My rule of thumb is I get one and wait several reboots to see if anything is actually affected. If not the file just gets deleted. I’ve found that the need to actually merge content from the old file to the new one is rare.
I have a problem with temporary mounting for an NTFS folder, I get the same error with udisksctl, gnome-disks, dolphin.
$ udisksctl mount -b /dev/sdb2
Error mounting /dev/sdb2: GDBus.Error:org.freedesktop.DBus.Error.NoReply: Message recipient disconnected from message bus without replying
I had the same message when I tried to mount an old HD disk, in a case, that I know is problematic, with various errors on it, I was about to discard it and buy a new, but I will loose precious data. Then I opened “gnome-disk-utility” and saw “verify system archive” and “correct system archive”, I ran both, before this it works. Between all this I made tests on the disk with “GSmartControl” with positive results: it’s ok to use it.
I didn’t need to downgrade “util-linux”.
I have a coredump of the mount:
I was in the habit of doing just that and noticed most of the time there was noting that needed merging. I do keep a copy of both files before ever deleting the .pac file just in case.
Something is indeed wrong with util-linux and/or util-linux-libs, when updated to latest my pc wont boot to its GUI anymore and stays in restore mode with a read-only partition.
I see in the log:
mei 23 19:55:16 imac kernel: #2
mei 23 19:55:16 imac kernel: #3
mei 23 19:55:16 imac systemd[1]: dev-mqueue.mount: Failed with result 'exit-code'.
mei 23 19:55:16 imac systemd[1]: Failed to mount POSIX Message Queue File System.
mei 23 19:55:16 imac systemd[1]: sys-kernel-debug.mount: Failed with result 'exit-code'.
mei 23 19:55:16 imac systemd[1]: Failed to mount Kernel Debug File System.
mei 23 19:55:16 imac systemd[1]: sys-kernel-tracing.mount: Failed with result 'exit-code'.
mei 23 19:55:16 imac systemd[1]: Failed to mount Kernel Trace File System.
mei 23 19:55:16 imac systemd[1]: systemd-remount-fs.service: Failed with result 'exit-code'.
mei 23 19:55:16 imac systemd[1]: Failed to start Remount Root and Kernel File Systems.
mei 23 19:55:16 imac systemd[1]: sys-fs-fuse-connections.mount: Failed with result 'exit-code'.
mei 23 19:55:16 imac systemd[1]: Failed to mount FUSE Control File System.
mei 23 19:55:16 imac systemd[1]: sys-kernel-config.mount: Failed with result 'exit-code'.
mei 23 19:55:16 imac systemd[1]: Failed to mount Kernel Configuration File System.
mei 23 19:55:16 imac systemd[1]: tmp.mount: Failed with result 'exit-code'.
mei 23 19:55:16 imac systemd[1]: Failed to mount Temporary Directory /tmp.
mei 23 19:55:16 imac systemd-remount-fs[223]: /usr/bin/mount for / exited with exit status 32.
mei 23 19:55:17 imac systemd[1]: sys-kernel-config.mount: Failed with result 'exit-code'.
░░ Subject: Unit failed
░░ Defined-By: systemd
░░ Support: https://forum.manjaro.org/c/support
░░
░░ The unit sys-kernel-config.mount has entered the 'failed' state with result 'exit-code'.
mei 23 19:55:17 imac systemd[1]: Failed to mount Kernel Configuration File System.
░░ Subject: A start job for unit sys-kernel-config.mount has failed
░░ Defined-By: systemd
░░ Support: https://forum.manjaro.org/c/support
Restored with timeshift to previous version for the time being…
Cheers,
Eddy
It must be on my past install i did it previously. So minimum 3,5 years ago, maybe even 6. Things just tend to work, so instead of spending endless time constantly comparing .pacnews i just wait until things break, and in meantime rely on that if some common config change is needed it will be mentioned in stable update thread
Chrooting in to fix things is pretty painless (never needed to do it, just tested once) and i have enough trust in developers that “forgetting” to update a config won’t catastrophically break something and eat my data.
manjaro-tools-base-git the file /usr/share/manjaro-tools/pacman-mirrors.conf still has community in it.
When building an iso this is seen
==> ERROR: invalid symlink: '/usr/lib/libnss_files.so.2'
==> ERROR: invalid symlink: '/usr/lib/libnss_dns.so.2'
=> WARNING: errors were encountered during the build. The image may not be complete.
what i failed to mention was that, i had also defaulted ntfs3 driver in udisks, and the absence of error is probably due to that. however when i explicitly set ntfs-3g driver, i did run into more or less the same error.
$ udisksctl mount -t ntfs-3g -b /dev/sdb1
Error mounting /dev/sdb1: GDBus.Error:org.freedesktop.UDisks2.Error.OptionNotPermitted: Requested filesystem type `ntfs-3g' is neither well-known nor in /proc/filesystems nor in /etc/filesystems
in any case if you plan switching to ntfs3 please make sure you run
$ sudo ntfsfix -d /dev/sdXX
on any partition you have previously run ntfsfix without the -d flag, before mounting.
Thank you, @koshikas! I tried to switch from ntfs-3g to ntfs3 using Arch Wiki, but I didn’t pay attention to -d (--clear-dirty) flag. Now everything works with ntfs3.