You are not logged in.
So how would we use it to do that as well?
Errr, that's a simple tar command, you need to specify the path where the resulting compressed and archive db will be stored. I have no idea where do you want to put it, I would do
tar cfz /home/karol/backup/pacman-database.tgz /var/lib/pacman/local
Offline
Since this thread has been resurrected from 16 months back, that script I posted contains
sudo pacman-optimize && sync
Since then, the DB format has changed and I'm not sure if the pacman-optimize script is still useful, it may even be harmful for all I know. I'm still using it due to being too lazy to update my scripts but I've not looked into if it causes any harm or makes any concern-able difference with the new DB format.
Offline
Since this thread has been resurrected from 16 months back, that script I posted contains
sudo pacman-optimize && sync
Since then, the DB format has changed and I'm not sure if the pacman-optimize script is still useful, it may even be harmful for all I know. I'm still using it due to being too lazy to update my scripts but I've not looked into if it causes any harm or makes any concern-able difference with the new DB format.
I've been doing some tests myself and I don't think it does much but wastes some time for the "optimization". No harm so far though.
Offline
Hi,
Sorry to bump an old thread. I found it because of Arch Linux plugin in oh-my-zsh repository. It has a function paclist() which references this thread's URL.
Here it is:
function paclist() {
# Source: https://bbs.archlinux.org/viewtopic.php?id=93683
LC_ALL=C pacman -Qei $(pacman -Qu | cut -d " " -f 1) | \
awk 'BEGIN {FS=":"} /^Name/{printf("\033[1;36m%s\033[1;37m", $2)} /^Description/{print $2}'
}
# README.md
List all installed packages with a short description
At first, I struggled to understand that function, because it's description is incorrect, and shell invocation chain is little bit weird. Nevertheless, in the end I figured out it's not actually about "all installed packages", but rather "packages which are available for upgrade".
Nowadays, the same can be achieved much simpler and more reliable with just pacman -Qqeui. Why reliable? Because in absence of upgradable packages shell substitution would produce no arguments, hence pacman -Qei would be treated as it is, and will print ALL explicitly installed packages.
Besides, the whole awk stuff probably can be replaces with proper expac(1) invocation:
pacman -Qqeu | xargs -I '{}' expac '\e[1;36m%n\e[1;37m %d\e[m' '{}'
Note that xargs -I syntax is resistant to empty input, and won't run expac at all.
However, pure expac cannot show versions like pacman -Que, since it only operates on either local db, or sync db at a time.
"Everything not saved will be lost" -- Nintendo quit screen message.
"Anything not merged upstream will be left behind" -- my attitude.
Offline
That just reads quite horrifying from the outset as the only way that command is even gonna give you any output is when you bring yourself into partial update territory by running -Sy without an -u but that's probably par for course with OMZ...
Just use checkupdates if you want to care about that list in a safe manner.
In any case one should read https://wiki.archlinux.org/index.php/System_maintenance if one cares about what's the current strategy regarding maintaining a system.
Closing this old thread.
Online