1

I accidentally deleted the /tools directory in my Ubuntu 18.04 system. Is this something to worry about? What did it contain?

6
  • I was constructing a temporary system(Linux from Scratch) and had a symbolic link to it, instead of deleting the symbolic link, I ended up deleting the whole dir. So, I guess there was not anything important as such. But I am really not sure if Ubuntu had something important in it by default.
    – ba11b0y
    Feb 1, 2019 at 17:00
  • That sounds like a directory you created. What makes you think it came from Ubuntu?
    – terdon
    Feb 1, 2019 at 17:36
  • Just like that. Probably it's just a symlink then
    – ba11b0y
    Feb 1, 2019 at 17:44
  • Shall I delete the question then?
    – ba11b0y
    Feb 1, 2019 at 17:45
  • 1
    Up to you :) If you are satisfied that it is indeed something you created, either delete or post an answer explaining that.
    – terdon
    Feb 1, 2019 at 18:19

2 Answers 2

2

It's not part of the default install, and apt-file is not helpful;

apt install -y apt-file && apt update && apt-file search /tools | wc -l
58302

So check your install log

cat /var/log/apt/history.log ; zcat /var/log/apt/history.log.*

or if you maintain an install.sh check that.

2
  • The install logs gives a lot of packages installed. How do I know which among them were residing in /tools.
    – ba11b0y
    Feb 1, 2019 at 17:03
  • 7
    Note that apt-file search '/tools' is going to find matches anywhere in the installed path - you'll get a very different answer (probably zero) if you match paths rooted at / i.e. apt-file search -x '^/tools' - AFAIK /tools is not part of the Linux FSH at all Feb 1, 2019 at 17:16
1

As per the comments, it turns out that the tools directory is not a default directory and in my case was just a symbolic link. The other answers on the other hand provide a reliable way to check packages installed(if any) just in case.

Not the answer you're looking for? Browse other questions tagged .