You are not logged in.

#1 2010-01-22 19:02:08

ebal
Member
From: Athens, Greece
Registered: 2009-05-26
Posts: 224
Website

pkglist

I am using a script via cron that has saved me many-many-many times and i'd like to share it with you.

# cat /etc/cron.hourly/pkglist

#!/bin/sh
mkdir -p /var/cache/pacman/pkglist/`date +%Y/%m/%d` && pacman -Qqe > /var/cache/pacman/pkglist/`date +%Y/%m/%d/%H_%M`

It produces a package list every hour (you can change it to daily if you like) and you can reinstall (or clone) your system at any point.

Last edited by ebal (2010-01-22 20:48:44)


https://balaskas.gr
Linux System Engineer - Registered Linux User #420129

Offline

#2 2010-01-22 19:25:51

Xyne
Forum Fellow
Registered: 2008-08-03
Posts: 6,965
Website

Re: pkglist

Use "pacman -Qqe" to get a list of packages which you've installed explicitly instead. That will let you reinstall all packages with the correct install reason.


My Arch Linux StuffForum EtiquetteCommunity Ethos - Arch is not for everyone

Offline

#3 2010-01-22 19:40:08

Stythys
Member
From: SF Bay Area
Registered: 2008-05-18
Posts: 878
Website

Re: pkglist

just curious..can you run pacman -Qqet to narrow the package list further? -t is specified as packages 'not required by any packge.' If this means, any other package on the current system, then this should work, but not if it meant, any package in general.


[home page] -- [code / configs]

"Once you go Arch, you must remain there for life or else Allan will track you down and break you."
-- Bregol

Offline

#4 2010-01-22 20:32:21

Xyne
Forum Fellow
Registered: 2008-08-03
Posts: 6,965
Website

Re: pkglist

Stythys wrote:

just curious..can you run pacman -Qqet to narrow the package list further? -t is specified as packages 'not required by any packge.' If this means, any other package on the current system, then this should work, but not if it meant, any package in general.

If you use "-Qqet", then some packages which you've installed explicitly would be reinstalled as dependencies, which is almost certainly not what you want. For example, if you've installed foo, then bar which depends on foo, "-Qqet" will only list bar. If you then re-install with that list, foo would be counted as a dependency and removed when you remove bar, which is not what would happen before you reinstall.


My Arch Linux StuffForum EtiquetteCommunity Ethos - Arch is not for everyone

Offline

#5 2010-01-22 20:48:25

ebal
Member
From: Athens, Greece
Registered: 2009-05-26
Posts: 224
Website

Re: pkglist

@Xyne thanks for the tip and plz keep up the excellent work around archlinux.

I've played with bash the last couple hours and made a bash script for backing up directories with a snapshot logic.
I 've post it here if anyone cares.


https://balaskas.gr
Linux System Engineer - Registered Linux User #420129

Offline

Board footer

Powered by FluxBB