Merry Christmas & Happy 2027! Less downtime. More good times. Celebrating 13 years of sorlavit.com
Skip to content
Sorlavit KimIT Support, Network & Infrastructure Services Let’s talk

ปุ่มแปลไทยจะเปิดบทความผ่าน Google Translate เพื่อแปลอัตโนมัติ โดยคงโค้ดและคำสั่งไว้ตามต้นฉบับ

Linux Commands / IT Support Guides

Find the Debian package that owns a file

A configuration or executable may belong to a managed package rather than a manually installed tool. Identify its owner before reinstalling or replacing it.

Compiled for Sorlavit Kim · Published · Updated · 1 min read

Environment and inputs: Linux · Bash-compatible shell; package and service names vary by distribution

Try the diagnostic command

Use the stated shell and platform. Replace sample domains, addresses, services and paths with values from the system you are authorized to support.

dpkg-query -S /bin/bash

How to read the result

On Debian-family systems, this searches installed-package file records for the supplied path. A no-match result can mean the path spelling differs or the file is unmanaged.

What to do next

Use the exact affected path and account for merged /usr layouts or symlinks. Inspect the matched package version and repository before planning a repair.

Before you make a change

This command is for dpkg-based distributions. A package match describes ownership records, not a cryptographic integrity check of the current file.

Share this article

Back to all articles