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)

Similar Messages

  • How to find upgradable packages in the system?

    After each `pacman -Sy' synchronization, is there a easy way to find out what packages in the system are upgradable?

    Doing a
    pacman -Syu
    will sync up with the repositories and then upgrade all the packages on your computer that need upgrading. It will display all the packages that need upgrading and ask you if you want to upgrade them, so you can exit without upgrading if you change your mind.
    Be sure to check out the pacman wiki and the wiki and forums if your unsure about programs in the future.
    Edit: wow, beat me to the punch

  • Selling Computer - Like to know how to clean all info off the computer

    Hi All
    I am selling a 17 Inch Imac and I'm trying to find out how I wipe all information from the system so there is no personal info for the new user to see.

    The best way is to zero out all the data by ins erting your install disc, then going to Disk Utility, selecting the hard drive you want to erase and then chosing either zero out data,7 or 35 passes. It will take about a minute for each GB of data for each pass, the more passes, the longer it takes, but the more secure your disc is.
    Hope this helps,
    Miriam

  • [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 delete a company in the system?

    Hi all,
            i am create three companies in the same B1 system. Now i just want to know how to delete one company from the system?
    thanks,
    Suresh Yerra.

    Hi Rajesh,
                  It's very simple.
    1. login to SQL Server
    2. In the databases u can find the three companies
    3. delete the particular company database from the SQL databases.
    Let me know if u have any queries regarding this?
    Thanks,
    Suresh Yerra.

  • Me and my partner are currently using the same apple id and have no space left on our devices. We are currently waiting on the iphone 6 plus to arrive and don't know how to transfer all data to the new phones.

    Me and my partner are currently using the same apple id and have no space left on our devices. We are currently waiting on the iphone 6 plus to arrive and don't know how to transfer all data to the new phones.?

    I don't know if I'm asking this all in a way that can be understood? Thanks ED3K, however that part I do understand (in the link you provided!)
    What I need to know is "how" I can separate or rather create another Apple ID for my son-who is currently using "my Apple ID?" If there is a way to let him keep "all" his info on his phone (eg-contacts, music, app's, etc.) without doing a "reset?') Somehow I need to go into his phone's setting-create a new Apple ID and possibly a new password so he can still use our combined iCloud & Itunes account?
    Also then letting me take back my Apple ID & password, but again allowing us (my son and I) to use the same iCloud & Itunes account? Does that make more sense??? I'm sincerely trying to get this cleared up once and for all----just need guidance from someone who has a true understanding of the whole Apple iCloud/Itunes system!
    Thanks again for "anyone" that can help me!!!

  • SQL query problem:  how tp select all duplication in the table?

    Hi all,
    I have a table with the following columns:
    1. contact_id
    2. fname
    3. lname
    4. email
    The email column must be unique (unfortunately it's not); therefore, I have to delete all duplication in the system.
    Question: how can I select all duplication in the table?
    I tried this...didn't work (I'm expecting only the emails that are duplicated)
    THANK YOU!
    SELECT distinct TC1.email, TC1.contact_ID FROM ta_contacts AS TC1 where TC1.email <>'' AND TC1.email not in (   SELECT distinct TC2.email   FROM ta_contacts AS TC2   where TC2.email <>'' )

    Sounds like an SQL and not a JDBC question. In any case, if a column needs to be unique, then you should, of course, designate a unique constraint on the table so you never end up with duplicates in the first place.

  • How to compile all package body using sqlplus ?

    hi all,
    How to compile all package body using sqlplus ?
    Please help.
    Amy

    dbms_utility.compile_schema will compile all the invalid objects in a schema, including the invalid package bodies. If you only want to compile the invalid package bodies, you could write your own dynamic SQL stored procedure to do that using the user_source view, but that's a lot more effort for a very minimal benefit.
    Justin
    Distributed Database Consulting, Inc.
    http://www.ddbcinc.com/askDDBC

  • Rename SAP username - Find all references in the system

    Hi all,
    we want to rename (copy and create new sap user id) in our SAP system.
    Now we have to find all objects and relationships where the old users are specified.
    Is there a way how to find all program where the users are specified?
    Z-Programs where users are specified?
    Z-Customizing tables where users are specified?
    Customizing settings where users are specified?
    Any ideas?
    regards

    >
    CC_BC Team wrote:
    > we want to rename (copy and create new sap user id) in our SAP system.
    > Is there a way how to find all program where the users are specified?
    > Z-Programs where users are specified?
    > Z-Customizing tables where users are specified?
    > Customizing settings where users are specified?
    > Any ideas?
    > regards
    Last time one of our user changed her last name we create new user id for her and then locked and deleted old account.
    I don't think its possible to change username from all documents/objects/change documents which users has created under his/her id. The best, and the only way I think is to create new user id and delete/lock old one.
    Regards,
    Pawan.
    PS: profile parameters and favourites can be copied from old user id to new or any other user id.
    Edited by: Pawan Kesari on Aug 17, 2010 8:21 PM

  • My Photoshop Elements 11 came with my Toshiba Qosmio.  The Photoshop is freezing recently. How to reinstall? Where's the serial number?

    My Photoshop Elements 11 came with my Toshiba Qosmio.  The Photoshop is freezing recently. How to reinstall? Where's the serial number?

    DTebar wrote:
    My Photoshop Elements 11 came with my Toshiba Qosmio.  The Photoshop is freezing recently. How to reinstall? Where's the serial number?
    Toshiba must have or should have provided you with a CD/DVD and seril number with the machine.  however, if PSe is freezing then the first thing you need to try is to reset it to default settings.  This can be done in two ways but the easiest ay to do is to go to (I am mentioning only the one method here):
    <C:\Users\username\AppData\Roaming\Adobe\Photoshop Elements\11.0\Editor>
    Find the file called: Adobe Photoshop Elements 11 Prefs.psp  and rename it to: Adobe Photoshop Elements 11 Prefs.old
    For username you need to insert the correct username or Windows profile name.  Also, when you are doing this, make sure PSE is closed completely i.e. you should not have it open to do any work.
    I am assuming you know how to browse the relevant folders if they are hidden in the system because this is taken for granted here.  Also, the file names may not have any extensions but I am sure you know how to make them display on the screen.
    Good luck.

  • How Can One Run Only In The System Administrator ( ie root ) ?

    Upon creating a System Administrator ( ie root ) in Command + R , of course after Clean Installing OS X ML with my own specific Apple Verified Account ,
    i have the Log In screen from a startup , either Safe Boot or a Boot , and i have my own specifc Apple Verified Account , plus the Other... ,
    which the Other... of course is the System Administrator ( ie root ) .
    How Can One Run Only In The System Administrator ( ie root ) ?
    Is there a way in Terminal with sudo su to make it work ?
    Shall i just always log in with Other... System Administrator ( ie root ) , and just forget the my own specific Apple Verified Account ?

    As of EHP3, you could still install some EHP components. On an ERP 6.00, you could just push SAP_APP to 6.03 and move on. Now if you want another component in your system with an EHP4 version, you can't have some components at EHP3 and some at EHP4. You would install EHP4 for the new component you desire updated and part of the work will be to also update SAP_APP to 6.04.
    EHP4 is an UPGRADE process, with shadow instance & all the joy of an upgrade process. You can either run ressource minimized or downtime minimized. In resource minimized, the shadow instance runs on the same server as the main instance. Downtime minimized allow to run the shadow instance on a separate / new server. Anyway you go, you will always have a "Downtime Phase" when you bring back the updated components from the shadow instance toward the real production one.
    As with any UPGRADE project, the benefits of installing EHP4 for your business has to weighted against the downtime cost.
    Our tests so far on small systems (few data, few users, 120GB database) show ~3 days process from EHP3 to EHP4 (all components) with a downtime phase of about 22 hours using the "resource minimized" path, i.e. shadow & main instance on the same server (4 CPUs, 16GB RAM). Until you give a try at your Sandbox or DEV systems, you won't have realistic figures for your environment.
    Good luck!

  • Md5 checksums of all packages from the specified directory

    How to check md5 checksums of all packages from the specified directory with pacman?

    karol wrote:It's 4.30 AM, the sun comes up and I'm going to bed.
    Hmmm, the blue sky and violet-pink clouds remind me of Arch homepage ;P
    Hehe, it's a nice feeling, nevertheless.
    @dkorzhevin: here's a script I've made when I needed this:
    #!/bin/bash
    echo -n "" > pkgNotFound
    echo -n "" > pkgSums
    names=`pacman -Slq`
    for name in $names
    do
    versionLine=`pacman -Si $name | grep "Version : "`
    version=`echo -n $versionLine | sed -e 's/Version : //g'`
    md5Line=`pacman -Si $name | grep "MD5 Sum : "`
    md5=`echo -n $md5Line | sed -e 's/MD5 Sum : //g'`
    pkgPath=`find /var/cache/pacman/pkg/ -name $name"-"$version"*"`
    if [ "$pkgPath" = "" ]
    then
    echo "Error: "$name" package not found in cache." >> pkgNotFound
    else
    echo $md5" "$pkgPath >> pkgSums
    fi
    done
    exit 0
    So your output will be located in the file "pkgSums" and it will look like this, these are the checksums that pacman displays, and the paths of your local packages:
    4ce0d40359bfa1a4a0f47a0e53e65fa5 /var/cache/pacman/pkg/acl-2.2.49-1-x86_64.pkg.tar.xz
    24df396b3146d1a203e0d4f4d6edd67b /var/cache/pacman/pkg/ar9170-fw-1.0-2-any.pkg.tar.gz
    8454e0fc947f9c8ce4ac5c39ed6ef165 /var/cache/pacman/pkg/attr-2.4.44-1-x86_64.pkg.tar.gz
    9ef6b0ce43a4660170df21ead2f8e711 /var/cache/pacman/pkg/autoconf-2.65-2-any.pkg.tar.xz
    505fe675565601f6ca803779601837cf /var/cache/pacman/pkg/automake-1.11.1-1-any.pkg.tar.gz
    To check the checksums against the packages, just run md5 with the newly created file, if you get output then something stinks :
    # md5sum -c --quiet pkgSums
    There's another file "pkgNotFound" for the packages which are found in pacman but not on your disk. So make sure you don't have these two files already, in the current directory, containing important information - they will be overwritten.

  • How to call a package from the Report in Oracle Application Express

    How to call a package from the Report in Oracle Application Express

    Hello,
    What do you mean? Something like SELECT mypackage.function( par1, par2) from dual?
    Or do you want to execute a procedure when something happens on the page, like clicking a button?
    Greetings,
    Roel
    http://roelhartman.blogspot.com/
    You can reward this reply by marking it as either Helpful or Correct ;-)

  • How to conf  in Hyperion, so the system couldn't login with the same user

    Hai.....
    how to configure in Hyperion, so the system couldn't login with the same user id in different machine ? (could you please provide me with detail step by step ? )
    rgds
    uka fp

    fane_j wrote:
    Sally R. wrote:
    Someone gave me a suggestion to go to the terminal and type in the following:
    ls /Users/Shared/.*.so
    This was published on MacWorld's site, and it's not a very good tip. Try this instead
    ls -la /Users/Shared/*.so
    Turns out I was wrong about that. Somebody else suggested something even more complicated and got this reply:
    By bastion
    Fri Feb 24 08:49:05 PST 2012
    PeterSParker said
    Your terminal statement has an extra "." in it that prevents it from working.
    Also, you should add the options -alR to show what is happening, and to search subdirectories.
    The revised command looks like this:
    ls -alR /Users/Shared/*.so
    The above is completely wrong. The command as shown in the article is appropriate.
    The "." is not extra and doesn't prevent the command from working. It's specifying that you're listing files that start with a period and end with ".so" with anything in between being matched.
    Because you're explicitly searching for things that start with "." you don't need the -a flag.
    Because you only care about simple existence and not any metadata you don't need -l.
    Because the files of interest are installed in /Users/Shared directly, and not subfolders thereof, you don't need -R.

  • How to show all items in the reading list? I think this option has been removed in Safari Version 7.0.2

    How to show all items in the reading list? I think this option has been removed in Safari Version 7.0.2

    Thanks. That solved it. I had my doubts since I wasn't concerned about my lost bookmarks. I was concerned about the broken functionality. In any event, restoring from a backup solved both the functionality and the lost bookmarks. I appreciate the response!

Maybe you are looking for

  • Sharepoint AppFabric Issue

    Hi All,    Just recently new to Sharepoint in our company we have went with the foundation 2013 product. Had a bit of bother Setting the server up initially as our servers do not have direct access to the internet, so did the offline installation thr

  • Creative ALchemy home page prompting for username/passw

    The Creative ALchemy Home Page http://preview.creativelabs.com/alchemyis suddenly prompting for a username and password. Can this be fixed please?

  • Cannot find JavaBean?

    Created JSP program that calls a javabean but for some reason it cannot find the javabean class. here is the JSP that tries to do the import (This jsp sits in C:\jakarta-tomcat-4.0.3\webapps\webdav\myJSPs): <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0

  • Error loading template 0TPLB_0CSAL_C01_Q0021_1

    Dear all, I am running BI 7.0 for 2 years and implementing CRM in a separate server now.  We have CRM Web UI set up and has using links to BI reports.   It is frustrated since most links are using BW 3.X template and I am running BI 7.0 so I have to

  • How to put my apple store in switzerland french

    i make the download of itunes choosing langage  french - Switzerland en after my itunes store its all in german !