Score:0

How to restore libusb-* after using rm -rf libusb-*?

nc flag

How to restore libusb-* after using rm -rf libusb-*?

It removed > 100mb including nvidia etc. drivers and now I end up only with a terminal which I can log into. Gnome desktop isn't available anymore?

vanadium avatar
cn flag
This will not remove anything, unless the files libusb-* are in the current directory. In general, a `rm` cannot be restored - you have to replace new copies of the deleted files.
hr flag
What directory were you in when you ran this command?
Score:0
tw flag

If you do apt-file search libusb | grep .so or apt-file search libusb or apt search libusb you will see a number of packages providing the files you removed. Here are some specific ones that caught my attention on my system:

libusb-0.1-4: /lib/x86_64-linux-gnu/libusb-0.1.so.4
libusb-0.1-4: /lib/x86_64-linux-gnu/libusb-0.1.so.4.4.4
libusb-1.0-0: /lib/x86_64-linux-gnu/libusb-1.0.so.0
libusb-1.0-0: /lib/x86_64-linux-gnu/libusb-1.0.so.0.2.0

You can do: sudo apt install libusb-1.0-0 and that will install that package. Process the output of the aforementioned commands, go through each libusb* in the output and you can install the package by specifying the package name to apt.

hr flag
It might make more sense to run something like `dpkg -S "$PWD/libusb-*"` in the directory where they ran the original `rm` command - that will limit the results to packages that are currently installed on the system and that provided files that may have been deleted
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.