Linux Labs

Packages, services, and logs / Stage 2 of 13

Installed packages and their files

Not running Starting usually ~20 s
Leave the lesson

Step 6 of 8 · on a machine · 3 min

When dpkg -S finds nothing

The output no path found matching pattern means one thing: the database records have no such path. There are two reasons for that.

The file may have been put in place without a package: a program built by hand or copied into /usr/local/bin. Such files are not in the database at all.

Or the package recorded the same file under a different path. dpkg -S compares the path literally, as it was recorded at installation. On Ubuntu, /bin is a symbolic link to /usr/bin:

bash
ls -ld /bin

The output ends with /bin -> usr/bin: one directory under two names. Some packages recorded their files through /bin, others through /usr/bin. which prints one path, while the database may hold another.

Key points

  • no path found means the path is not in the database records; the file may still be on disk.
  • Files put in place without packages are not in the database.
  • /bin and /usr/bin are one directory, but to dpkg -S they are different paths.
Ubuntu 24.04
Loading…