12

I just managed to overwrite /usr/share/bin

and it doesn't seem like it's possible to undo.

I did this as a root user.

Am I doomed?

1 Answers1

30

Not doomed at all.

Nothing critical in a Ubuntu Desktop or Ubuntu Server install uses /usr/share/bin.

Run dpkg -S /usr/share/bin to list your installed packages that use dir. Those packages, if any, should be reinstalled.

If the reply is no path found matching pattern, then you indeed have nothing installed that uses the dir.

user535733
  • 68,830
  • It just sends me an error message dpkg-query: no path found matching pattern /usr/share/bin –  Nov 17 '18 at 16:37
  • 6
    That would indicate that you have no installed packages referring to the directory. – Charles Green Nov 17 '18 at 17:02
  • 2
    Indeed, this doesn't look like a standard location. – Ruslan Nov 17 '18 at 22:58
  • @Ruslan: I've seen it in the standards before (but it might not be in the current ones); since the only plausible things that could live there are scripts and jitted binaries being empty/non-extant is plausible. – Joshua Nov 18 '18 at 21:04
  • @Joshua given that /usr hierarchy is not normally writable, I doubt there could be jitted binaries. I'd rather expect them in /var/cache or somewhere else under the /var tree. – Ruslan Nov 18 '18 at 21:13
  • @Ruslan: jitted binaries means binaries that run via a jitter, not binaries that are the output of a jitter. – Joshua Nov 18 '18 at 21:15