deb-src-files - Linux


deb-src-files is a command-line utility for extracting source files from Debian packages. It allows users to obtain the original source code used to build a specific Debian package, enabling them to audit, modify, or recompile the source if needed.


deb-src-files [-a] [-v] [package-name]...


  • -a: Extract source files for all installed packages.
  • -v: Show verbose output, displaying each extracted source file.


Extract source files for a specific package:

deb-src-files firefox

Extract source files for all installed packages:

deb-src-files -a

Extract source files and display verbose output:

deb-src-files -v gimp

Common Issues

  • Permission denied: Ensure you have sufficient permissions to extract the source files. Running the command with sudo may resolve the issue.
  • Package not found: Verify that the package you specified is installed on your system.


Extract source files and rebuild a package:

deb-src-files firefox
cd firefox-*
dpkg-buildpackage -b -uc -us

Related Commands

  • dpkg: Manage Debian packages.
  • dpkg-source: Extract source code from Debian packages.
  • apt-get source: Download source code for installed packages.

Debian Package Management