I use the Cinnamon edition and in that edition there is also a ‘Root editor’ in the menu that opens ‘Nano’ as root - I can then edit graphically.
But before I proceed I have the following files in /etc/
pacman.conf
pacman.conf.pacnew
pacman.conf.save
pacman.mirrors.conf
pacman.mirrors.conf.pacnew
pamac.conf
pamac.conf.pacnew
pamac-new-07152731.conf
Ignoring every line that starts with # there are very few difference between pacman.conf and pacman.conf.pacnew they are:
pacman.conf has Core, Extra, Community, and Multilib with 2 lines
siglevel = package required
include = /etc/pacman.d/mirrorlist
pacman.conf.pacnew has only Core, Extra, Multilib with only 1 line
include = /etc/pacman.d/mirrorlist
I’m thinking of just re-naming pacman.conf as pacman.conf.old
and then re-name pacman.conf.pacnew as pacman.conf
if all works well, I go back in and delete pacman.conf.old
also the pacman.conf.save is identical to pacman.conf
Thanks Scotty for confirming
As a said other than the repos there is very little difference between pacman.conf and pacman.conf.pacnew, but ‘cachedir’ is commented out (#) in .pacnew and there is also a ‘download user = ALPM’ ? I include both files below let me know what you think should (or should not) be in ‘pacman.conf’ thanks
pacman.conf
#
# /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
#XferCommand = /usr/bin/curl -C - -f %u > %o
#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
#TotalDownload
# We cannot check disk space from within a chroot environment
CheckSpace
#VerbosePkgLists
# 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
pacman.conf.pacnew
#
# /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
#XferCommand = /usr/bin/curl -L -C - -f -o %o %u
#XferCommand = /usr/bin/wget --passive-ftp -c -O %o %u
#CleanMethod = KeepInstalled
Architecture = auto
# Pacman won't upgrade packages listed in IgnorePkg and members of IgnoreGroup
#IgnorePkg =
#IgnoreGroup =
#NoUpgrade =
#NoExtract =
# Misc options
#UseSyslog
Color
#NoProgressBar
CheckSpace
#VerbosePkgLists
ParallelDownloads = 4
DownloadUser = alpm
#DisableSandbox
#ILoveCandy
# 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 Arch and 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.
#
[core]
Include = /etc/pacman.d/mirrorlist
[extra]
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]
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
You can’t always do that with pacnew files, particularly when the pacnew being provided is a blank config that is not set at all (for instance, IIRC, the locale pacnew is a fresh config file that has every single language/region setting commented out).
However, in this particular case, you can with the pacman.conf pacnew file as pacman should continue working with the latest pacnew version of the config file.
Note however that if you have previously created non-default settings in pacman or in whatever application whose config file has a pacnew [for instance, I have changed the parallel downloads setting in pacman.conf file] you can’t just blindly replace your config file with the pacnew version or else you will wipe out your settings.
just one last question.
the # in front of a line means that it is interpreted as a comment and not executed by the system
I noticed that some lines have # or ## and some even ### is there a significance to the numbers of # ?
no - there is no significance to the number of # other than formatting - several # indicates you read the text as descriptions and not an actual commented line.
is Not commented out and the ‘pkg’ file is 12gb big
in ‘pacman.conf.pacnew’ that same line is commented out (#) so not interpreted
Should this line ‘cachedir’ be commented out? or not?
Are the files in ‘pkg’ all the updates over time? if so, can they be limited to the 3 most recent just like in ‘Pamac’
While I’m not running out of space, 12gb of archived files seems a lot to keep!
Did you read the 2 lines above cachedir = var/cache/pacman/pkg?
# The following paths are commented out with their default values listed.
# If you wish to use different paths, uncomment and update the paths.
That means pacman defaults to the paths that are commented, including var/cache/pacman/pkg for the cache directory.
I suggest you have a read through pacman.conf(5), which includes the following section:
CacheDir = /path/to/cache/dir
Overrides the default location of the package cache directory. The default is /var/cache/pacman/pkg/. Multiple cache directories can be specified, and they are tried in the order they are listed in the config file. If a file is not found in any cache directory, it will be downloaded to the first cache directory with write access. NOTE: this is an absolute path, the root path is not automatically prepended.
D’oh! I should have read that properly
I assume the files in ‘pkg’ are all the updates using ‘Pacman’ they go back to Nov 2019, so I can certainly reduced them - I should probably keep the most recent, just in case?
The update files when using ‘Pamac’ are store somewhere else (where?) but as per the settings only the 3 most recent packages are kept, so that file should not keep on growing.