Reinstalling all installed packages using pacman
I feel my installation is corrupted .volcontrol muted on every boot,nautilus crashing,etc and more.
So,I though of reinstalling whole Gnome-2.22
I got below script somewhere in this forum or wiki maybe:but the script is erring out :?
please help !
pacman -S $(pacman -Qq | grep -v "$(pacman -Qmq)")
and got the below error message
error: no targets specified (use -h for help)
Last edited by praka123 (2008-04-24 14:47:47)
Run the command pacman -Qq and pacman -Qmq separately and try to find out why it breaks.
pacman -Q displays all packages, pacman -Qm displays the packages that are not in any repos, that is the packages you installed manually == foreign packages. You can't reinstall these foreign packages with pacman -S by definition.
So you have to filter them out of pacman -Q output.
pacman -S $(pacman -Qq) fails here, because I have 3 foreign packages, but pacman -S $(pacman -Qq | grep -v "$(pacman -Qmq)") works.
Similar Messages
-
Redownload and reinstall all installed packages
I need to redownload and reinstall all installed packages, because I made some tests with prelink and something goes wrong. I found an article in wiki that covers download of installed packages, but howto reinstall them all?
The problem is that some apps are acting weird. I also have problem with compiling of AUR packages, because I get this error message:
checking how to recognise dependent libraries... pass_all
checking how to run the C preprocessor... /lib/cpp
configure: error: C preprocessor "/lib/cpp" fails sanity check
See `config.log' for more details.
make: *** No targets specified and no makefile found. Stop.
The gcc package is installed. Any sugestions?
Last edited by macros78 (2007-09-09 12:19:21)I think this should do it...
pacman -Q | grep -v pacman | cut -d' ' -f1 > packages.txt
pacman -Sy `cat packages.txt` --noconfirm -
Can't update/search/install packages via pacman or yaourt
Everything was fine until I manually installed package-query and yaourt and now I am unable to update/search/install packages via pacman or yaourt.
Earlier I was having trouble installing the package-query and yaourt packges using pacman so had to install them manually and now it wont connect to the repos.
My eth0 is up, the proxies are set, all browsers work so no problem from the network side.
:: Synchronizing package databases...
error: failed retrieving file 'core.db' from mirror.us.leaseweb.net : Connection timed out after 10001 milliseconds
error: failed retrieving file 'core.db' from mirror.nl.leaseweb.net : Connection timed out after 10001 milliseconds
error: failed retrieving file 'core.db' from mirror.de.leaseweb.net : Connection timed out after 10001 milliseconds
error: failed retrieving file 'core.db' from archlinux.polymorf.fr : Connectionclfarron4 wrote:I usually advise against this (mainly because it's out-dated) but there is the [archlinuxfr] repository for installing yaourt, if you really insist on sticking with it. Once you're done, disable the repository though because everything except for yaourt is out-of-date by at least a month.
Don't ever suggest that. The repo is 100% useless since it is trivial to install yaourt from aur. Also yaourt/package-query in that repo is often broken/outdated.
Also it is not relevant to op's problem anyway. There were some routing issue to leseweb the other day, I also noticed it. Just switching mirror works fine.
Last edited by Mr.Elendig (2013-09-04 13:37:49) -
Need to redownload all installed packages [SOLVED]
I found the redownloading all installed packages wiki page, but when I attempt either of the suggested commands on the page, pacman chokes on the first package that I installed out of the AUR. Can someone recommend how I can simply download all of my currently installed packages to my local db?
Thanks!
# pacman -Sdw --noconfirm `pacman -Q | awk '{ print $1 }'`
# wget $(pacman -Sdp `pacman -Q | awk '{ print $1 }'`)
Last edited by graysky (2009-08-18 19:26:57)I actually think it does... when I use your shell command after all my packages are populated, I get a line that reads, "checking package integrity..." then a fresh shell.
VERIFIED: it does indeed. I removed /var/cache/pacman/pkg/zvbi-0.2.33-1-x86_64.pkg.tar.gz then touched an empty file of the same name. After re-running your command, pacman detected the problem, removed the offending package and re-downloaded when I ran it a second time. Smart
checking package integrity...
:: File zvbi-0.2.33-1-x86_64.pkg.tar.gz is corrupted. Do you want to delete it? [Y/n]
error: failed to commit transaction (invalid or corrupted package)
zvbi-0.2.33-1-x86_64.pkg.tar.gz is invalid or corrupted
Errors occurred, no packages were upgraded.
Last edited by graysky (2009-08-18 21:14:48) -
Deleted folder manually, now cant un-/ install anymore using pacman
hi there,
i accidently manually deleted a folder related to nexuiz some while ago and now can't uninstall nor install it using pacman anymore :x
the returned error is:
$ sudo pacman -S nexuiz
resolving dependencies...
error: could not open file /var/lib/pacman/local/nexuiz-data-2.5.2-1/depends: No such file or directory
error: could not open file /var/lib/pacman/local/nexuiz-data-2.5.2-1/depends: No such file or directory
looking for inter-conflicts...
error: could not open file /var/lib/pacman/local/nexuiz-data-2.5.2-1/depends: No such file or directory
error: could not open file /var/lib/pacman/local/nexuiz-data-2.5.2-1/depends: No such file or directory
error: could not open file /var/lib/pacman/local/nexuiz-data-2.5.2-1/depends: No such file or directory
error: could not open file /var/lib/pacman/local/nexuiz-data-2.5.2-1/depends: No such file or directory
Targets (1): nexuiz-2.5.2-2
Total Download Size: 0.00 MB
Total Installed Size: 5.30 MB
Proceed with installation? [Y/n]
then it trys to update to 2.5.2-2
btw; the nexuiz-data-2.5.2-1 folder is completely empty
i want to install it again, so how can i fix this ?naequs wrote:/e: removing the cache of not installed packages witch "pacman -Sc" did the trick for me
My girlfriend had the same problem, with clutter. However, this solution did not work for us, but I removed clutter and reinstalled it with "--force" ('pacman -Sf gnome-games' was the exact command, actually) because it was complaining about existing files in the system which basically were not managed by the package manager anymore. The problem was apparently caused by some disk errors, or something - her computer lost disk data with several other previous occasions.
The previous installation most likely left some garbage on the disk, but at least pacman works . -
Better to install PyPI packages using pacman or pip?
In Haskell, I ran into dependency issues when I had xmonad installed using pacman
and other packages installed using cabal.
Might a similar thing happen if I installed some PyPI packages (virtualenv, pymongo)
using pacman instead of pip?
My reason for wanting to install with pacman is that I'd be more likely to keep the
packages up to date - they'd be tied to the rest of my system, and there's no simple
command to upgrade all packages in pip.IMO, you should choose which method works best for you and stick with it.
If you use a 3rd party package manager, you should stick with it.
Or if you use pacman, you should stick with it.
http://sherlock.heroku.com/blog/2012/04 … -managers/
Towards the end I mention I don't really know much about pip and would investigate on how it works.
But as a general rule, I would say to try out the 3rd party package manager first and see if it works.
I would also recommend doing per user installs (install to $HOME) to keep files managed by pacman separated from files installed with the 3rd party package manager.
Cabal and Gem imo are both superior to using packages provided in the supported repositories for the reasons outlined in my blog post.
Hope this helps.
Cheers! -
Script to rebuild all installed packages from ABS
I realize pacbuilder is for that, but it doesn't seem to work properly for me. Skipping a lot of packages etc.
Anyway, I've made this very simple script to just rebuild every installed package from core/extra/community. Sorry for the localized echo output, but I think it's all very simple and straightforward to understand.
Edit:
I've improved it a bit, now it should work flawlessly and remember what stuff it has to finish no matter when you ^C out of it. Also it installs all compiled packages, if you want to avoid that, remove -i switch from makepkg.
#!/bin/sh
# user configuration
absdir="/home/mateusz/abs/autobuild"
pkgdir="/home/mateusz/abs/packages"
pkgfile="/home/mateusz/abs/autobuild.list"
# end of user configuration
topabs="/var/abs"
if [ ! -d $absdir ]; then
mkdir -pv $absdir
fi
if [ ! -d $pkgdir ]; then
mkdir -pv $pkgdir
fi
echo "(autobuild) Uaktualnianie bazy abs..."
sudo abs
if [ ! -f $pkgfile ]; then
echo "(autobuild) Tworzę listę pakietów do zbudowania..."
pacman -Qq > $pkgfile
else
echo "(autobuild) Znaleziono poprzedni build."
echo "(autobuild) Jeżeli nie chcesz go wykorzystać, skasuj $pkgfile"
fi
for pkgname in $(cat $pkgfile); do
echo "(autobuild) Szukanie pakietu $pkgname..."
find $topabs -type d -name "$pkgname" -exec cp -R {} $absdir \; 2> /dev/null
if [ -d "$absdir/$pkgname" ]; then
echo "(autobuild) Budowanie pakietu $pkgname..."
cd "$absdir/$pkgname"
makepkg -csir --noconfirm > /dev/null
if [ $? -eq 0 ]; then
echo "(autobuild) Pakiet zbudowany."
cat $pkgfile | grep -vx $pkgname > "$pkgfile.tmp"
mv $pkgfile.tmp $pkgfile
else
echo "(autobuild) Błąd budowania pakietu!"
fi
else
echo "(autobuild) Pakiet nieodnaleziony!"
cat $pkgfile | grep -vx $pkgname > "$pkgfile.tmp"
mv $pkgfile.tmp $pkgfile
fi
done
echo "(autobuild) Linkowanie pakietów do $pkgdir..."
find $absdir -name "*`uname -m`.pkg.tar.gz" -exec ln -v {} $pkgdir \; >/dev/null
echo "(autobuild) Zakończono."
exit 0
Last edited by xaff (2009-05-03 13:47:17)Here is the script translated into English (with a bit of help from Google Translate, as well as grammar cleanup).
#!/bin/sh
# user configuration
absdir="/home/aabbott/abs/autobuild"
pkgdir="/home/aabbott/abs/packages"
pkgfile="/home/aabbott/abs/autobuild.list"
# end of user configuration
topabs="/var/abs"
if [ ! -d $absdir ]; then
mkdir -pv $absdir
fi
if [ ! -d $pkgdir ]; then
mkdir -pv $pkgdir
fi
echo "(autobuild) Updating the ABS database..."
sudo abs
if [ ! -f $pkgfile ]; then
echo "(autobuild) Creating a list of packages to build..."
pacman -Qq > $pkgfile
else
echo "(autobuild) Found a previous build."
echo "(autobuild) If you don't want to use this build, delete ${pkgfile}."
fi
for pkgname in $(cat $pkgfile); do
echo "(autobuild) Searching for $pkgname..."
find $topabs -type d -name "$pkgname" -exec cp -R {} $absdir \; 2> /dev/null
if [ -d "$absdir/$pkgname" ]; then
echo "(autobuild) Building $pkgname..."
cd "$absdir/$pkgname"
makepkg -csir --noconfirm > /dev/null
if [ $? -eq 0 ]; then
echo "(autobuild) $pkgname built."
cat $pkgfile | grep -vx $pkgname > "$pkgfile.tmp"
mv $pkgfile.tmp $pkgfile
else
echo "(autobuild) There was an error when building ${pkgname}!"
fi
else
echo "(autobuild) $pkgname not found!"
cat $pkgfile | grep -vx $pkgname > "$pkgfile.tmp"
mv $pkgfile.tmp $pkgfile
fi
done
echo "(autobuild) Linking to $pkgdir..."
find $absdir -name "*`uname -m`.pkg.tar.gz" -exec ln -v {} $pkgdir \; >/dev/null
echo "(autobuild) Finished."
exit 0 -
Reinstall the installed packages
hi
I have dual boot system Ubuntu + Arch linux and I wanted to configure arch through chroot. unfortunatly I forgot to mount /dev and /proc so it got some errors during upgrade.
/tmp/alpm_xXzQ7F/.INSTALL: line 7: /dev/null: Permission denied
or
/sbin/mkinitcpio: line 253: /dev/null: Permission denied
I didn't start the system yet but I would like to reinstall packages if its posible. I found this command
pacman -S $(pacman -Qq | grep -v "$(pacman -Qmq)")
and it returns
error: no targets specified (use -h for help)
which is not so strange cause
pacman -Qmq
returns nothing which is strange
Any help would be apriciated.The "target" for your command is missing, s/b:
pacman -S $(pacman -Qq | grep -v "$(pacman -Qmq)" >pkglist)
This command is used to generate a list of installed packages such that they can be re-installed by pacman:
#pacman -S $(cat pkglist)
....EDIT
This pkglist has to be accessed possibly through usb flash such that the re-install is accomplished for the packages in the pkglist.
Please google "re-install pacman packages" for more accurate info( my info from memory).
Your /var/cache/pacman/pkg may not contain the desired packages altho I have no reason to believe it won't.
Last edited by lilsirecho (2009-11-05 18:22:25) -
Command to compile all installed packages
hi to all,
exist a command to compile all packages are installed in your system ?
thanksWe know what you want. We also know that instead of searching for it, you want someone to give you "a tip".
Well, I have a tip for you - don't do it. There is no appreciable benefit gained from recompiling all your packages, so save the time you would have spent on it for something more useful, and we'll leave it at that.
Alternatively, if you really want to do it - SEARCH THE FORUM.
Thread closed. -
How to filter installed packages in Pacman -Ss
I want to search a package in the repos but I don't want to see installed packages, I want to see only uninstalled packages. Is it possible? It is not very important or urgent, but I want to know if it is possible.
@Trilby, @ progandy
Thank you for your posts.
@progandy
I wrote a simple bash function with your answer, now I have what I want. Thank you again.
pacmanSs ()
if [ -z "$1" ] ; then
echo "Write something to search..."
else
pacman --color=always -Ss $1 | sed '/\S.*\[installed\]/,/^\s/d'
fi -
How to install packages use aur?
I want install dropbox package and download use tarball done,it save home dirctory.
so i follwed by https://wiki.archlinux.org/index.php/Ar … Repository .
# pacman -S base-devel is done. I try to find build dirctory no have.
i did make folder but not save it.then do this
[wasan@arch ~]$ cd ~/builds
bash: cd: /home/wasan/builds: No such file or directory
[wasan@arch ~]$ cd builds
bash: cd: builds: No such file or directory any help thanks.wasan wrote:I want install google earth ,libreoffice, drop box in arch. some binery files how to open and install. I try to open use arc no use, so choose via tarball method .thanks for answers.
At a guess, it seems like English might not be your first language. I would recommend you try asking in the Other Languages sub-forum. At least, LibreOffice is in the official repositories, so you shouldn't need to deal with the AUR if you don't want.
All the best,
-HG -
How can I find packages using pacman?
Hi--
I browsed through pacman HOWTOs and doc and I still don't know how I can find available packages on all the ftp sites in my pacman.conf file.
For example, I want to install Gnome. When I do :
pacman -Sy gnome,
it doesn't work. Is it because I should do something like :
pacman -Sy Gnome, or
pacman -Sy Gn..
Do you see what I mean? HOW DO I FIND THE RIGHT SYNTHAX FOR A PACKAGE, OR THE EXISTING PACKAGES?
Is there some kind of a search tool for the ftp repositories? For example,
pacman <-search option> Gno* (for all packages beginning with Gno)
ThanksCarbono wrote:pacman -Sy gnome,
it doesn't work. Is it because I should do something like :
In general you need to know name of the package(s). In the case of Gnome, Xfce4 and KDE, simply call the name of group. What you did suppose to work.
[root@localhost ~]# pacman -Sy gnome
:: Synchronizing package databases...
:: current is up to date
:: extra is up to date
:: unstable is up to date
:: staging is up to date
:: group gnome:
control-center gnome-applets gnome-backgrounds gnome-common
gnome-desktop gnome-icon-theme gnome-media gnome-mime-data
gnome-panel gnome-session gnome-themes gnome2-user-docs metacity
nautilus rep-gtk vte yelp
Install whole content? [Y/n] -
[Feature] view already installed package when pacman -Ss
Maybe I've miss something but when I pacman -Ss sth
I have a list of package related to this sth but it would be nice to know if it's already installed
Also yaourt include this feature already
Last edited by ChoK (2008-10-25 20:46:58)Here's a script that you can use to search the repos and see which of the results you already have installed:
#!/usr/bin/python
import sys
import os
import re
# colors
CURRENT_VERSION="\x1B[0;32m" # used if installed version is the current version
OLDER_VERSION="\x1B[0;36m" # used if installed version is an older version
RESET="\x1B[0;39m" # the default color
def get_args():
if len(sys.argv) > 1:
return ' '+' '.join(sys.argv[1:])
else:
return ''
local_pkgs = {}
local_regex = re.compile('(\S+)\s+(\S+)\s*(?:\n|$)')
local_list = os.popen('pacman -Q').read().rstrip()
for match in local_regex.findall(local_list):
(pkg,ver) = match
local_pkgs[pkg] = ver
search_regex = re.compile('((\S*?/)(\S+)\s+(\S+)(.*?)\n(\s+.*?)(?:\n|$))')
search_list = os.popen('pacman -Ss'+get_args()).read().rstrip()
for match in search_regex.findall(search_list):
(full,repo,pkg,ver,group,desc) = match
if local_pkgs.has_key(pkg):
if ver == local_pkgs[pkg]:
print "%s%s%s %s%s\n%s" % (CURRENT_VERSION,repo,pkg,ver,RESET,desc)
else:
print "%s%s%s %s%s\n%s" % (OLDER_VERSION,repo,pkg,ver,RESET,desc)
else:
print full.rstrip()
Just pass it the search term that you would pass pacman. I've added 4 comments at the top to make it clear how to change the output colors if you want. -
[Solved] Forcing pacman to reinstall all packages.
To avoid making myself look any stupider than necessary, I'll try and keep this short.
I ran out of space on my root partition in the middle of a pacman -Syu. This resulted in a lot of non-functioning packages. I have already successfully increased the size of the partition to about four times its old size using the Gparted LiveCD, and miraculously enough, Archlinux still boots, I still have wifi (and thus Internet access), and pacman still works. If pacman upgrades a package, it appears to start functioning again, which is nice. Now the problem.
Essentially, I would like to perform an upgrade on all packages on my system, including the ones that are up to date. This should fix them. Unfortunately, pacman -Syu (or -Syuf) only upgrades packages that appear out of date. I'm aware that I can accomplish this on a package by package basis simply using pacman -S, but I don't know of a way to obtain a list of all installed packages. How might I upgrade all the up to date ones as well?
Also, if anyone asks why my root partition was so small, the answer is some variation on the phrase "I'm an idiot".
Last edited by Som_Gye (2008-02-18 05:00:06)neotuli wrote:
pacman -S `pacman -Q| cut -d' ' -f1`
So to answer your question, 'pacman -Q' lists installed packages. By the sounds of it, you might want to browse through the pacman manpage (it's good stuff, really!), there are a lot of nifty options you probably don't know about yet.
Also I'm guessing the excuse you're looking for is something like... "i didn't get my tacos that day"
Please feel free to shoot me down in flames if I am wrong won't this mark everything as explicitly installed? Not usre if that would be a problem or not. -
How to reinstall all packages in the system?
I accidentaly remove whole /usr directory, so all installed apps are gone. I then installed the basic system from the install CD, all user and system configuration leave untouched. pacman even remember what packages were installed, when i try install some of the previously installed packages pacman says: this package is up to date, upgrade anyway Y/n? So all I must do to get my system up and running again is reinstall all previsously installed packages. Is there any way how to do this by a single command? Or some script? I don't want to reinstall all the packages one by one ...
Last edited by kotyz (2007-07-03 18:27:21)Mefju wrote:
If you're pacman database is not removed, you could use something like this
#! /bin/sh
for pkg in $(pacman -Q | cut -d' ' -f1); do
pacman -S --noconfirm $pkg
done
pacman would error out if he's using any non-repo pkgs (like stuff from unsuported AUR)
working on a script now, will edit when i get it working.
#!/bin/bash
pacman -Q | awk '{ print $1 }' > installed.tmp
for i in $(pacman -Qm | awk '{ print $1 }'); do
cat installed.tmp | sed "s/^$i\$//;" > installed.tmp.1
mv installed.tmp.1 installed.tmp
done
pacman -S --noconfirm `cat installed.tmp`
rm installed.tmp
i think that'll do the trick... just make sure you backup your /etc before hand, it might overwrite stuff.
Last edited by kano (2007-07-03 19:47:07)
Maybe you are looking for
-
Hello, my CSS fiole passes 3C3 but my Template which had over 39 problems is now down to Four. I could use some help because I'm clueless to what they are saying. The following notes and warnings highlight missing or conflicting information which cau
-
Mac Mini will not boot after Security Update 2008-007
Hello, A G4 Mac Mini machine I was asked to take a look at will not boot after the owner (succesfully) installed Security Update 2008-007 from Software Update. Booting always hangs at the blue screen after the Apple logo, and booting in verbose mode
-
Creation of Recurring Inspection Lots with Serial numbers
Hello, We have the following scenario at our client : <i>MIGO_GR</i> is used to create GR for materials with Serial number requirement. The serial numbers can be generated automatically or manually entered on the screen. At this point of time, the Sh
-
How can I get my bookmarks back after uninstalling Firefox?
When uninstalling Firefox, it asked me if I wanted to delete my bookmarks, etc. I clicked in the check box to delete them, but after a couple days, I realized I should have saved them. Someone told me there is probably a temp folder that is hidden so
-
A checkbox in a loop must be selected by default
Hi all, There are two lists of checkboxes (in a loop), and one of the checkboxes list in the loop must be selected by default. I am trying to put the value of the checkbox to true but it is yeilding bizzare results... one of them being the checkbox d