I accidentally deleted some essential system files

So, I accidentally deleted several directories from /usr...
I have a ton of data on that computer that I cannot loose and cannot back up
A bunch of packages like su, sudo, and even pacman are not there anymore
Hypothetically, if I were to run this machine in a chroot, could I run pacstrap and get all the packages again? Or, will I have to run it in a chroot and manually download each package?
Will either of these delete data from my computer? Will either of these even work?
Last edited by dubble (2014-06-12 21:04:28)

Id like to offer a few recommendations to prevent this in the future.
First, I concur with everyone above- have a backup! It makes problems like these no big deal. A liveCD and rsync will have you back in business in no time.
Second, if you use BTRFS, snapshots are an awesome feature. You could literally rm -rf /etc and all youd have to do is boot a prior snapshot. (P.S. Dont do this for any reason, even if you know what youre doing. It will work, but dont). I have my rootfs in a subvolume, and I have a snapshots subvolume. I have a bash script that takes snapshots once a week (total of 3) and I update using my own script that integrates optional preupgrade snapshots (in case the latest upgrade causes breakage due to Arch's rolling nature), news feeds, etc. You might want to consider something like this..
Third, there is a cool utility called pakbak that could have saved you in this situation. It backs up your pacman databases whenever a database change happens. You could have restored pacman and your databases, then made sure everything was installed properly.
Good to see you got out without data loss. Ive lost data due to not having a backup and it sucks!
**EDIT** Link to pakbak in the AUR: https://aur.archlinux.org/packages/pakbak-git/
Last edited by GSF1200S (2014-06-15 08:10:31)

Similar Messages

  • I accidentally deleted some files from iCloud, how do I recover the files if I do not have other backup or in time machine

    I accidentally deleted some files from iCloud, how do I recover the files if I do not have other backup or in time machine

    You don't.

  • I accidentally deleted some drivers from my macbook air and now i can not access app store and system preferences as it says the following message (You can't open the application System Preferences because it may be damaged or incomplete)

    i accidentally deleted some drivers from my macbook air and now i can not access app store and system preferences as it says the following message (You can't open the application System Preferences because it may be damaged or incomplete)

    Repair the Hard Drive and Permissions - Lion/Mountain Lion
    Boot to the Recovery HD:
    Restart the computer and after the chime press and hold down the COMMAND and R keys until the menu screen appears. Alternatively, restart the computer and after the chime press and hold down the OPTION key until the boot manager screen appears. Select the Recovery HD and click on the downward pointing arrow button.
    Repair
    When the recovery menu appears select Disk Utility. After DU loads select your hard drive entry (mfgr.'s ID and drive size) from the the left side list.  In the DU status area you will see an entry for the S.M.A.R.T. status of the hard drive.  If it does not say "Verified" then the hard drive is failing or failed. (SMART status is not reported on external Firewire or USB drives.) If the drive is "Verified" then select your OS X volume from the list on the left (sub-entry below the drive entry,) click on the First Aid tab, then click on the Repair Disk button. If DU reports any errors that have been fixed, then re-run Repair Disk until no errors are reported. If no errors are reported then click on the Repair Permissions button. When the process is completed, then quit DU and return to the main menu. Select Restart from the Apple menu.

  • Accidentally Deleted some Messages app Library Files

    I accidentally deleted some of the important messages app library files.  Is there a way to restore them?

    Hi,
    Do you have a Time Machine Backup ?
    If so navigate to where you deleted the files from then use the Time Machine icon n the DOCK and Restore them.
    If not Restore the whole OS as there is no other way.
    8:33 pm      Saturday; September 6, 2014
    ​  iMac 2.5Ghz i5 2011 (Mavericks 10.9)
     G4/1GhzDual MDD (Leopard 10.5.8)
     MacBookPro 2Gb (Snow Leopard 10.6.8)
     Mac OS X (10.6.8),
     Couple of iPhones and an iPad

  • Is it possible to add new tags after i accidentally deleted some?

    I was renaming all the new coloured tags on my MacBook and i accidentally deleted some of the tags. I now dont have enough for all my different subjects but can see no option to add new tags, is it possible?

    What I've done to create new tags from scratch is to create a throwaway text file called "tag test" (or something like that) and temporarily place it on my Desktop for easy access. Then, in Finder, I select the "tag test" file and click the "Edit Tags" icon in the toolbar at the top of the Finder window. (The "Edit Tags" icon looks like a horizontal switch.) From there, you can create a brand-new tag (say, "Tag 1"). After you press Enter, "Tag 1" will appear in the Tags list in the Sidebar. Two-finger click "Tag 1" in the Sidebar, and from the contextual menu, select the color you would like to apply. (You may also rename "Tag 1" to something else if you choose.)
    Repeat this process as many times as necessary in order to recreate all the tags you'd like -- and then delete the "tag test" file.
    Hope that helps.

  • HT4847 On startup my macbookair says start up disk full/delete some files. When I look at storage disk utility I see 51GB of a possible 60GB is used with Other. What is Other? and how can I view and delete some of these files?

    On startup my macbookair says start up disk full/delete some files. When I look at storage disk utility I see 51GB of a possible 60GB is used with Other. What is Other? and how can I view and delete some of these files?

    A MacBook will use Time Machine to make local backups so that when connected to an external drive it will backup a lot faster.
    to disable this, you must use a command under terminal.
    to locate terminal, do a search for it under spotlight (the magnifying glass on the top right corner), should be the first hit.
    once under terminal, type the following text exactly:
    sudo tmutil disablelocal
    hit enter.
    you will be asked to input your password, if you do not have a password, you will have to create one before performing this command. after entering your password, hit enter again and close terminal.
    in a few minutes the space taken up by time machine should be cleared.

  • I can not delete some power point files in the trash.help?

    I can not delete some power point files in the trash.help?

    Hi Gary,
    The presentations were created originally with PowerPoint. I have been using them on both KeyNote and PowerPoint with no problem, even after updating to MountainLion. Problems started at the 10.8.3 upgrade. The installation was an upgrade form Lion. Yes I mean Open Office, I am able to open the presentation with Open Office and play it with no problems.
    The presentation gets loaded by Power Point and the Power Point freezes. Key Note can not even load it. Stops 3/4 of the way. This happens with ALL my presentations.
    I want to thank you for your help.
    Leonardo

  • I accidentally deleted some photos from my camera roll on my iPhone. Is there a way to recover them?

    I accidentally deleted some photos from my camera roll on my iPhone. Is there a way to recover them?

    Also to add to what Ana said, if you've been importing http://support.apple.com/kb/HT4083 to your computer as you would a digital camera.  Then you can sync http://support.apple.com/kb/HT4236 them back to your phone using iTunes.

  • I think I've deleted some essential files.

    Thanks to 2 hours of sleep, a glitch in WhatSize which led me to believe the files were something that they were not, and my genius, I may have deleted some important files. My OS X Tiger installation disc is in the U.S. and I am currently in France. I have also not yet restarted my computer after deleting these files.
    I went back into WhatSize and had it 'reveal in finder' the 'private' folder from which I deleted various files. I'm not sure if this is in any way informative, but there are some folders whose icons have small 'Do Not Enter' signs in the bottom corner. If these are of any significance, I have them written down.
    I believe I've deleted several swap files. In WhatSize under private/var/vm I see 3 files: sleepimage (1GB), swapfile0 (64MB) and app-profile (0 bytes).
    My big question is what do I do now? If the answer is to reinstall OS X, will I need to back up my important files on a separate hard drive before doing so? If I turn off my computer will it turn back on?
    Thanks in advance.
    And, yes, I now know not to delete ANY files unless I am 100% sure what they are. Double-check and triple-check. I blame the sleep deprivation.

    Thank you very much for your response. I see what you are saying, but the sleepimage and the 64MB swap file are not what I deleted- they are what remain after deleting god knows what. Then again, I imagine that if I had deleted something truly essential to the functions of the computer, I would not be able to write this. I'm just nervous about restarting the machine for fear of losing 90G of music (of which only 60G is backed up- I know that's bad, but I'm saving up for new external & internal hard drives). That's really my only concern since I know I can reinstall OS X if need be.

  • Accidentally deleted some files.

    I was installing a program and managed to accidentally delete everything in my /usr/local/bin directory. Is it possible somehow to restore all the default programs that were in there?

    You could always run your installer DVD, do an "archive and install" preserving your user settings, then apply the 10.5.6 combo update. If you had any customizations in the unix part of the previous system (other than in /usr/local/bin) you can just copy or move them over from the Previous Systems folder.

  • I accidentally deleted some files in my Notes on my Iphone 4s, is there a way to retrieve them?

    I was trying to copy and paste in my Notes and accidentally deleted them after highlighting. Is there a way to retrieve them???? I assume that once you delete them on one device, it deletes them in the cloud and other devices because they are not there.

    If you use iCloud then use the restore feature. If you backed up to your computer then restore from there. However if   you did not backup prior to erasing the notes, then they're gone.

  • Use Referenced Masters To Avoid Accidentally Deleting A Master Image File

    If you use Managed images it is possible to delete the master file accidentally.  If you delete versions of an image using File -> Delete Version and the version you are deleting is the last remaining version for that image, Aperture 3 will delete both the version and the master image.  If you subsequently empty Aperture Trash and then System Trash that master image file is gone forever.  In Aperture 3 there is no warning that you are about to delete a master image. 
    A workaround (although a weak workaround) is to use Referenced Image Masters.  Then when you delete the last version which includes the master image from Aperture, you can uncheck the box "Move referenced file to system trash." and no master image file will be deleted.  The downside to this workaround is that when you really want to delete a master image file, it must be done via Finder.
    The best solution would be for Apple to fix this bug so that when you select "Delete Version" it only deletes the version image and reverts to the master image.  That way the master image can only be delete via the command "Delete Master Image and All Versions."

    There is no bug there.
    I had some trouble wrapping my mind around the file-Master-Version-Image-(Preview) complex that flows, sand-like, through the entire working of Aperture.  (I like a thing to be represented by itself and itself alone, and to exist in one place and one place alone.  I was comfortable with the seeming precision of the location-based "file+path" metaphor for the existence of these virtual things.  Aperture quite cleverly moves beyond that.)  Two things helped me move forward:
    - understanding the difference between Projects and Albums, and
    - separating my Library into a storage area and an output area.
    Projects are, for me, storage containers.  (I have said elsewhere that the mis-naming of "Projects" is the single worst interface decision made in Aperture.)  They have a privileged relationship with your Images:  every Image must "live" in a Project, and "lives" in only one Project.  It may help you to think of "Image+Project{Path}" as functionaly equivalent, within the Aperture Library, to the file directory "file+path" mentioned above.
    Albums are, for me, output containers.  I create Albums every time I know I will output a set of Images.
    In practice, I work on Images in each.  In general, I develop my digital captures in the Project that holds them (and I rigorously stick to "One Project = One shoot"), I create Versions and add them to Albums as needed for output (they are automatically made the Album Pick), and I tweak them for output and then output them from Albums.
    You may be wondering (if you've read this far) -- "What has this got to do with deleting Masters?"  A lot.  Note the difference in the context-menu between a Version in a Project and a Version in an Album.  The menu for the Album contains two delete commands: "Delete Version", and "Remove from Album".  The Versions live in Projects, and only visit Albums.  As Terence correctly points out, if you delete the last Version, your expectation should be that you are deleting that Image from your Library.  My suggestion is that you adopt something similar to what I've set up, and delete Versions from ONLY Projects (never from Albums).  This way you will never unknowingly delete the last Version (because Images can be in only one Project, and if you delete the last Version from that Project you know you are expunging that Image from your Library).

  • How do I recover Apple's stock python after accidentally deleting it from /System/Library/Frameworks/Python.framework? Is a Snow Leopard restore the only option?

    I accidentally and foolishly deleted my COMPLETE folders: /System/Library/Frameworks/Python.framework/Versions/2.5 and /System/Library/Frameworks/Python.framework/Versions/2.6. Almost 10,000 files were trashed, and only three files would not go through. One of them was the 2.5 python executable. So I put this file back to its original location from trash, but it won't execute (probably for a reason - since Python is missing its remaining files).
    I have a python.org python2.7 up and running, but my understanding is that Snow Leopard needs its stock apple provided python for the system to function properly.
    Is my only to format my hard drive and restore Snow Leopard from scratch?

    I'm actually not trying to do anything other than compile a python script for analyzing scientific data. I am a BIOLOGIST and have absolutely no interest in python for the sake of python. I just need to analyze my data. To get there, I need python/numpy/scipy/wxpython/matplotlib and many other things. I don't know why this seems so "suspicious"??? It's a free world - people are allowed to mess with things. It's not like I am threatening Apple - I made a mistake. Plain and simple. What's the big deal???
    I was deleting some skeleton files that were leftover from previous versions of programs and libraries. And that's how I ran into the python2.5 and 2.6. I thought - I will never use these pythons again - why do I have 2.5 files still on my system. I thought I was in /Library/Python, but I was actually in /System/Library/Frameworks. By the time I realized I had wiped out the system's python, it was too late - trash was emptied permanently.
    I am in no way trying to "experiment" with apple's python. I know apple's python can happily coexist with python.org or macports python.
    In general, I get frustrated with trying to run python bioinformatics scripts on my Mac because there is always an issue. It's either that python is running in 64 bit mode and the scripts are too old. Or, the default apple provided gcc screws up. Quite frankly - Apple and Python are not always best friends.
    I used to have a multitude of pythons through fink and macports but I wiped them all out and installed python.org's python27. I also switched to github for all my dependencies and libraries.
    In the future, I'll just find a Linux machine to run bioinformatics. I love my Mac, but so far, I have had nothing but nightmares with Python and Apple trying to be friends. Linux is so much better for these types of activities. I can even do a Virtualbox Ubuntu on my MBP and take it from there...
    For example, many bioinformatics scripts were made with Carbon and require Carbon. But guess what? Apple kept support for 64-bit Cocoa, but only supports 32-bit Carbon. That makes life ****. Why have a 64 bit architecture with no support for it?

  • Unable to load project after delete some path with files but not used at all

    Im using the demo of Premiere Pro CC last demo download today.
    All the fuc**ng day editing some videos, and saved, then I deleted som efolder containing some video files (almost not used) then when I try to open premiere the project I were working, premiere opens, load and freezes and nothing happens, it keeps on the main area withouht any windows, and I cant get my 10 hours of work What happening with thei premiere ? And Im unable to open the project in Premiere CC 7.0 from another computer as saif it was done using new version.
    I NEED A SOLUTION !
    Or never never more use premiere

    I NEED A SOLUTION !
    Don't do this mid stream in EDIT
    ... I deleted som efolder containing some video files (almost not used)...
    TRY  - Go to you Back Up project file or an Auto save and hope that recovers some of your work afterrestoring what you deleted.

  • HT4522 I would like to delete some time capsule files that I erased from my mac. Please and thanks

    Please help me deleting some files that are in my time capsule which I have erased from my computer
    thank you

    Since you deleted the files on your Mac, Time Machine will eventually delete them automatically from the Time Capsule, so you really need do nothing.
    If you really do want to delete the files right now, open Time Machine, wait for it to load and use the timeline on the right side of the window to go back to a date when the files were still on your Mac.
    Use the Finder like interface to navigate to the specific file that you want to delete and click on it to highlight it
    Click the gear icon at the top of Time Machine window and click "Delete all backups of  xxxxxxxx"
    Do the same for other files that you want to delete.
    Click Cancel at the lower left of the window to return to your normal desktop

Maybe you are looking for

  • Schedule Background jobs automatically -

    Hello Guys, I have the following requirement. I have a copy program in BPS-SEM(ABAP program). Users have to run the copy program for different combinations like variant:1 costcenetr 100-200 valuetype - 10 user 1 variant:2 costcenetr 400-500 valuetype

  • ORA-00600: internal error code, arguments: [ktsircinfo_num1], [7], [8], [41

    Hi I am using Oracle 8i. ( 8.1.7) Windows NT 4.0 Application was developed in VB / Oracle. Application was stable for a long time.Suddenly We are getting this message. ORA-00600: internal error code, arguments: [ktsircinfo_num1], [7], [8], [4162759],

  • Function module not released

    Hi, I have a requirement where I need to insert/delete international versions of BP standard Address.(This is not the International Address Usage in the Address Overview tab. The international versions can be added by the international versions butto

  • How to tell if Yosemite is clean install or upgrade from previous version

    My brand new MacBook Pro arrived last week, with Yosemite already installed on it. Having issues with WiFi (after coming out of sleep mode, mbp keeps its self-assigned address rather than getting an address though DHCP or using its old address), I wa

  • How to output data outtside a for loop every 10 iterations​?

    Hi friends, does any body help me to sort out this problem? please check the attchement for my vi. all i want is output data from inside for loop to outside for loop every 10 iterations. please do not use local variable. Many thanks dan Attachments: