You are not logged in.
Pages: 1
Topic closed
Alright, I've just ran through the pacman man page again, And I can seem to find a -Q switch that shows packages from a certain repo.
I want to delete all the packages I have from TURs and delete the sources from my pacman.conf and make said packages myself.
Offline
I don't remember seeing an option to list packages from a specific repo. Perhaps if this isn't a current feature, it would make a good one for future development.
Offline
er - it's scriptable to some extent using pacman -Sl reponame and some grepping of pacman -Qs ( i think, am in windows)
Offline
pacman -Sl repobut only if the repo is in your repo list
wget -q -O - http://path/to/repo.db.tar.gz | tar -tvz | grep -e "^d" | awk '{print $6}' if you know the db.tar.gz url and just want to see what packages are in there.
EDIT: *Sigh* nevermind. reread your original post and realized you were talking about something else entirely..
:oops:
"Be conservative in what you send; be liberal in what you accept." -- Postel's Law
"tacos" -- Cactus' Law
"t̥͍͎̪̪͗a̴̻̩͈͚ͨc̠o̩̙͈ͫͅs͙͎̙͊ ͔͇̫̜t͎̳̀a̜̞̗ͩc̗͍͚o̲̯̿s̖̣̤̙͌ ̖̜̈ț̰̫͓ạ̪͖̳c̲͎͕̰̯̃̈o͉ͅs̪ͪ ̜̻̖̜͕" -- -̖͚̫̙̓-̺̠͇ͤ̃ ̜̪̜ͯZ͔̗̭̞ͪA̝͈̙͖̩L͉̠̺͓G̙̞̦͖O̳̗͍
Offline
Dunn oif you have done something similiar yourself, miqorz but i wrote a script for this
#!/bin/sh
pacman -Qi >./all_files
if [ -z "$1" ] ; then
echo -e "33[0;37mNo repo given!"
echo " usage: scriptname reponame"
fi
reponame=$1
list=$1_list
pacman -Sl $reponame >./$list
sed -i "s|$reponame |g|" ./$list
repo=`cat ./$list | cut --fields 2 --delim " "`
for pkg in $repo ; do
if [[ $(cat ./all_files | grep -w "$pkg") ]] ; then
echo -e "33[0;34m$pkg33[0;37m is installed"
echo "$pkg" >>./installed_files
elif [ "$2" == "all" ] ; then
echo -e "33[0;31m$pkg33[0;37m is NOT installed"
fi
done
echo
echo -n "Would you like to save the names of these pkgs to a file? (Y/n) "
read choice
if [ "$choice" == "Y" -o "$choice" == "y" ] ; then
echo "Currently in `pwd`"
echo -n " Save as: "
read filename
if [ -z $filename ] ; then
echo "No name given saved as ./installed_files_$reponame"
cp -u ./installed_files ./installed_files_$reponame
else
cp -u ./installed_files $filename
fi
rm ./installed_files
else
rm ./installed_files
fi
rm ./$list ./all_fileslike all my code it could probably be improved quite a bit but it does a good job!
give it a name and run it with:
script reponame
you can add 'all':
script reponame all - and it will tell you what isn't installed as well - i wouldn;t use it for extra and base tho but good for personal repos.
You can save the pkg names that are installed to a file and simply do:
pacman -R `cat file`
to remove all the stuff from that repo - obviously use such stuff with caution - that's why it's not and option in the script.
Offline
This is what I did based on the previous post.
#!/bin/bash
# List packages from a particular repository. Usage: command repo_name
comm -1 -2 <(pacman -Q|awk '{print $1}'|sort) \
<(pacman -Sl $1 | awk '{print $2}'|sort)Last edited by lpb612 (2012-02-15 18:13:14)
Offline
This thread is kinda old, you know.
Use '-q' switch instead of awk:
comm -12 <(pacman -Qq|sort) <(pacman -Slq $1|sort)Offline
lpb612, you should know better than necroing a 7 year old thread.
Our forum rules: https://wiki.archlinux.org/index.php/Forum_Etiquette
Closing.
aur S & M :: forum rules :: Community Ethos
Resources for Women, POC, LGBT*, and allies
Offline
Abuse of mod powers....
pacman -S pacman-contrib
paclist <repo>
Offline
Pages: 1
Topic closed