Reinstalling All Packages

Hey all,
Let's say I messed up permissions and things for all my files and libraries. What's the best way to purge and reinstall every installed package so as to get more or less of a clean install? I basically want to reinstall without reinstalling. I can't uninstall packages manually and then reinstall them since that would eventually leave the system in an unusable state ex: when the glibc package gets uninstalled.
Last edited by solarwind (2008-09-28 23:32:18)

AD28 wrote:
Doesn't '-Qqm' only return manually compiled packages?  I think this might be what you're looking for, but I'd wait for confirmation from someone more knowledgeable than I am..
pacman -S $(pacman -Qq)
Crap, I was playing around to stop the attempt at installing foreign packages and cut and pasted wrong....
It is probably best to go:
pacman -Qq > pkglist
for pkg in $(pacman -Qqm); do
sed -i "s#^${pkg}*##" pkglist
done;
pacman -S $(cat pkglist)

Similar Messages

  • 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)

  • [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.

  • [SOLVED] some problems after reinstalling all packages

    Hi all,
    I had to reinstall everthing on the computer via
    pacman -S $(pacman -Qnq)
    then I move a few files back to their original place such as
    /etc/shadow and /etc/passwd
    now i'm having various problems
    1) I can't run
    systemctl
    as a normal user anymore; I have to sudo into it.  I get this error message:
    Failed to get D-Bus connection: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.
    2) libreoffice wont run from my regular user account.  I get this error message:
    The application cannot be started. User installation could not be completed
    I tried uninstalling then reinstalling libreoffice.  Didn't fix it.
    Any ideas?
    Thanks
    Alan
    Last edited by beitme (2014-02-21 10:53:34)

    permissions are as follows:
    -rw------- 1 0 0 647 Oct 21 04:30 /etc/group
    -rw------- 1 0 0 614 Jan 19 17:10 /etc/shadow
    -rw------- 1 0 0 534 Oct 21 04:30 /etc/gshadow
    -rw------- 1 0 0 799 Oct 21 04:30 /etc/passwd
    contents of group are:
    root:x:0:root
    bin:x:1:root,bin,daemon
    daemon:x:2:root,bin,daemon
    sys:x:3:root,bin
    adm:x:4:root,daemon
    tty:x:5:
    disk:x:6:root,xbmc
    lp:x:7:daemon
    mem:x:8:
    kmem:x:9:
    wheel:x:10:root
    ftp:x:11:
    mail:x:12:
    uucp:x:14:
    log:x:19:root
    utmp:x:20:
    locate:x:21:
    rfkill:x:24:
    smmsp:x:25:
    http:x:33:
    games:x:50:
    lock:x:54:
    uuidd:x:68:
    dbus:x:81:
    network:x:90:xbmc
    video:x:91:xbmc
    audio:x:92:beitme,xbmc
    optical:x:93:xbmc
    floppy:x:94:
    storage:x:95:xbmc
    scanner:x:96:
    power:x:98:xbmc
    nobody:x:99:
    users:x:100:
    systemd-journal:x:190:
    ntp:x:87:
    polkitd:x:102:
    beitme:x:1000:
    lightdm:x:620:
    usbmux:x:140:
    avahi:x:84:
    transmission:x:169:
    rtkit:x:133:
    xbmc:x:1001:xbmc
    contents of passwd are:
    root:x:0:0:root:/root:/bin/bash
    bin:x:1:1:bin:/bin:/bin/false
    daemon:x:2:2:daemon:/sbin:/bin/false
    mail:x:8:12:mail:/var/spool/mail:/bin/false
    ftp:x:14:11:ftp:/srv/ftp:/bin/false
    http:x:33:33:http:/srv/http:/bin/false
    uuidd:x:68:68:uuidd:/:/sbin/nologin
    dbus:x:81:81:dbus:/:/sbin/nologin
    nobody:x:99:99:nobody:/:/bin/false
    ntp:x:87:87:Network Time Protocol:/var/lib/ntp:/bin/false
    polkitd:x:102:102:Policy Kit Daemon:/:/bin/false
    beitme:x:1000:1000::/home/beitme:/bin/bash
    lightdm:x:620:620:Light Display Manager:/var/lib/lightdm:/sbin/nologin
    usbmux:x:140:140:usbmux user:/:/sbin/nologin
    avahi:x:84:84:avahi:/:/bin/false
    transmission:x:169:169:Transmission BitTorrent Client:/var/lib/transmission:/bin/false
    rtkit:x:133:133:RealtimeKit:/proc:/sbin/nologin
    xbmc:x:1001:1001::/var/lib/xbmc:/bin/bash
    thanks

  • Mounting my computer partition in a livecd to reinstall pacman package

    Hello,
    I accidentally "sudo rm -rf /usr" (please don't ask why, really). So, I was told on IRC that I had to flash a .iso to a USB Drive. So I did, using another computer. I then rebooted the main computer where I sudo rm -rf'd /usr/ and booted this fresh .iso. So far, so good.
    Now, I have to use a pacman command that reinstalls all packages (all the binaries and etcs that I lost) from a mounted directory of my main computer on the livecd.
    I am logged in as root on the fresh livecd, but I have no idea of how to mount the main computer and then run pacman on it.
    /dev/sda1 boot
    /dev/sda2 (no idea)
    /dev/sda3 root
    /dev/sda4 home
    Those are my partitions. Any ideas on which should I mount and where? And then what is the pacman command to reinstall all packages and how can I run it from the mounted directory?
    Thank you.

    2ManyDogs wrote:
    ephan wrote:Thank you, I managed to mount it. But how to run pacman from it?
    You need to do all the chroot steps in that topic, not just the mount steps. Specifically this part: https://wiki.archlinux.org/index.php/Ch … hange_root
    After you run the "chroot" command, you have changed root to your old system and can run commands there.
    I'm pretty sure chroot will fail horribly if /usr is gone.
    What I would do, is to mount sda3 to /mnt, and then run:
    pacman --root /mnt --cachedir /mnt/var/cache/pacman/pkg --config /mnt/etc/pacman.conf -S base base-devel
    This should at least make your system bootable again, but you will probably need to reinstall a lot of stuff. Consider a fully new install.
    Last edited by Arctus (2012-11-07 23:58:07)

  • 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

  • How to force reinstall of all packages

    Hi:
    How can I force reinstall of all packages of my system without have physical access to the server?
    Can i do this with YUM?
    Please help,
    Regards
    Ricardo

    Rather than reinstalling everything how about verifying installed packages to see what changed, which would allow you to isolate a problem - I think.
    I have never done it but apparently there is yum-verify. Unfortunately I do not have OEL available right now to test it...
    http://linux.die.net/man/1/yum-verify
    To verify the binaries that are in a bin directory, use:
    yum verify --verify-filenames='*bin/*'
    To verify all include files, Eg. for multilib problems, use:
    yum verify-all --verify-filenames='/usr/include/*'
    Does this work?

  • 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.

  • Yum upgrade all packages problem (SOLVED)

    I keep getting this error when trying to do a YUM UPGRADE ALL?
    Oracle Linux 6.4
    Loaded plugins: refresh-packagekit, security
    Cleaning repos: epel ol6_UEK_latest ol6_latest virtualmin virtualmin-universal
    Cleaning up Everything
    Loaded plugins: refresh-packagekit, security
    Error: Cannot retrieve repository metadata (repomd.xml) for repository: epel. Please verify its path and try again
    Edited by: 981499 on Mar 20, 2013 7:23 PM

    I tried deleting it but still no luck.
    Reinstalled it and no go either.
    With it elrepo deleted this is the error I get.
    Upgrading all packages with command yum clean all ; yum -y update ..
    Loaded plugins: refresh-packagekit, security
    Cleaning repos: ol6_UEK_latest ol6_latest virtualmin virtualmin-universal
    Cleaning up Everything
    Loaded plugins: refresh-packagekit, security
    *http://public-yum.oracle.com/repo/OracleLinux/OL6/UEK/latest/x86_64/repodata/repomd.xml: [Errno 14] PYCURL ERROR 6 - "Couldn't resolve host 'public-yum.oracle.com'"*
    Trying other mirror.
    Error: Cannot retrieve repository metadata (repomd.xml) for repository: ol6_UEK_latest. Please verify its path and try again
    *.. upgrade failed!*
    Edited by: 981499 on Mar 20, 2013 6:43 PM

  • Pacman reinstall every package

    Hi
    I am getting a new system (intel atom) and I want to use my current arch install. However I have compiled probably about 75% of all the package on my system with some specific make flags for my processor.
    So how can I go about reinstalling every package on my system with the one that arch provides?

    I had to do this once and found this post http://bbs.archlinux.org/viewtopic.php?id=47608
    I think i used the last command pacman -S $(pacman -Qq | grep -v "$(pacman -Qmq)")
    edit, wasn't that topic it was an older one i remember using a command that allan posted that worked, not sure if its the same as that one.
    Last edited by droog (2008-06-12 22:58:10)

  • My drive recently had to be replaced with a new one installed by Apple they reinstalled all my stuff from my time machine. Most my programs had to be updated which I managed with a little help from my friends, but the last one that I can't solve is

    My IMAC OSX 10.6.8   2.8 GHz intelcore  2Duo 4GB 800 Mhz DDR2 SDRam recently had to have its hard drive replaced by apple thy actually had to give me a larger one because mine was no longer available,They also reinstalled all my programs and data from my 2 terrabite time machine back up. I got my system home and found that I had to upgrade most of my programs which I managed with a little help from my friends, but I still have one problem that I can't solve I have a Nikon Coolpix S6 that I have Been Syncing with my Iphoto since I've got it 3 years ago and now when I place it in the cradle the program reconizes it and says that it is going to start to import the new photos the little white wheel in the center of the screen starts spinning but nothing else happens. I checked all my connections and they are goog plus I even downloaded a nikon progam just to double check the camera & cradle and it works there but it wont pair off with my IPhoto.

    First go to iPhoto Preferences, look in both General and Advanced tabs to make sure that things are set to import from camera into iPhoto.
    Then if that doesn't help, connect the camera and open Image Capture in your Applications > Utilities folder and see if you can use Image Capture to reset the import path from the camera to iPhoto.
    Image Capture: Free import tool on Mac OS X - Macgasm
    Message was edited by: den.thed
    Sorry John, I didn't see your post when I clicked the reply button. Dennis

  • My HP computer's hard drive crashed.  I have replaced the hard drive and reinstalled all of the software.  I have copied my I tunes library from my backup hard drive to the new one.  How do I restore the permissions?  This is the 3 rd time I have had to d

    My HP computer's hard drive crashed.  I have replaced the hard drive and reinstalled all of the software.  I have copied my I tunes library from my backup hard drive to the new one.  How do I restore the permissions?  This is the 3 rd time I have had to do this.  THe share screen says you are limited to 5 ??

    No backup is not good.
    You can transfer itunes purchases from an ipod.  File>Transfer Purchases

  • I want to upgrade to Mavericks. Will I need to reinstall all of my apps and copy my files back to the hard drive?  I have not installed an OS on a Mac before and I'm wondering whether it is as involved as on a PC.

    I want to upgrade to Mavericks. Will I need to reinstall all of my apps and copy my files back to the hard drive?  I have not installed an OS on a Mac before and I'm wondering whether it is as involved as on a PC.

    Short answer: You do NOT have to reinstall all your apps and copy your files back.
    Longer answer: Upgrading the OS does not touch any user files. Upgrading the OS should not interfere with any applications which are compatible with Mavericks.  In my experience non-Apple apps are generally left unchanged by the upgrade.  It is possible that some apps may need to be upgraded. One good resource for checking application compatibility is RoaringApps.
    Finally, it is always wise to backup everything, just in case.

  • I have to reformat my hard drive and reinstall all of my programs. What do I do about Creative Cloud? I also still need access to CS6 (I have a Marksware converter for InDesign to Quark).

    I have to reformat my hard drive and reinstall all of my programs. What do I do about Creative Cloud? I also still need access to CS6 (I have a Marksware converter for InDesign to Quark).
    This is a MacBook Pro 15" (Model number A1286) running Mavericks. Hard drive is fine but system software has been corrupted. I cannot simply restore from Time Machine as it will copy the corrupt system.
    Will I have to find all of my serial numbers before I can launch any of the programs?
    Thanks

    For the Cloud, you log in to your paid Cloud account and download & install the same way you did the first time
    Cloud Getting Started https://helpx.adobe.com/creative-cloud/topics/getting-started.html
    If you have the perpetual license version of CS6 you install from your original media and use your serial number
    If you have the version of CS6 that is installed via the cloud use this link
    http://helpx.adobe.com/creative-cloud/kb/download-previous-versions-creative-applications. html
    -or http://www.adobe.com/downloads/other-downloads.html

  • My hard drive is DEAD.I have to reinstall all my Adobe programms and I need to know exactly the correct process to do ( Indesign CS6-Photoshop CS6 - Photoshop CS5 -Illustrator CS6 - Ligntroom 4 )....

    My hard drive is DEAD.I have to reinstall all my Adobe programms and I need to know exactly the correct process to do ( Indesign CS6-Photoshop CS6 - Photoshop CS5 -Illustrator CS6 - Ligntroom 4 )....
    is any friendly tutorial available ?
    Thank you
    Albert

    If you didn't have the opportunity to deactivate the installations then you should contact Adobe Support thru chat and ask them to reset your activations for all the serial numbers involved.
    Chat support - For the link below click the Still Need Help? option in the blue area at the bottom and choose the chat option...
    Make sure you are logged in to the Adobe site, have cookies enabled, clear your cookie cache.  If it continues to fail try using a different browser.
    Serial number and activation chat support (non-CC)
    http://helpx.adobe.com/x-productkb/global/service1.html ( http://adobe.ly/1aYjbSC )
    Then you just reinstall the programs and activate using the same serial numbers.  If you need to download you can find download available thru the following links...
    CS5 - http://helpx.adobe.com/creative-suite/kb/cs5-product-downloads.html
    CS6 - http://helpx.adobe.com/x-productkb/policy-pricing/cs6-product-downloads.html
    Lightroom - all versions
    Windows
    http://www.adobe.com/support/downloads/product.jsp?product=113&platform=Windows
    Mac
    http://www.adobe.com/support/downloads/product.jsp?product=113&platform=Macintosh
    You might also find the following helpful...
    Download and Installation Help -
    https://helpx.adobe.com/download-install.html

Maybe you are looking for

  • Time Machine Error Message: "sparsbundle could not be accessed (error-1)

    hi, I am running snow leopard on my iMac and have a mac mini connected via ethernet running Mac Leopard Server version 10.6. I backed up my iMac onto my Mac Leopard Server using Time Machine about a year ago and then I turned it off and haven't done

  • Highlight text for Print

    I am trying to find a way to be able to highlight text in a document and and then print it with the text highlighted (as you would when reading an article and marking thru important points with a pen highlighter) Also how would I highlight multiple b

  • 10.5.6 Combo Update not allowing me to select the HD for the install

    I have downloaded the Combo update from Apple's site [around 650Mb]. -Double Clicking the .dmg mounts it. -Double clicking on the mounted icon runs the installer. -After clicking 'Next' a couple of times I have to select the location of the install -

  • Can't debug in FB3

    Hi, I installed FB3 3.0.1 plugin into Eclipse (Europe). I can run the application in FB3, but can't debug - get Error 404 "Requested resource is not available". I added argument "-debug=true" to Flex compiler, but still have a problem. Running in IE6

  • I added Edit Preferences Quiz Pass or Fail If Passing Grade Go to the next slide

    Unfortunately, it doesn't work. The playback frame stays on the quiz reporting page. Please, can anybody tell me what I could be doing wrong?