If the package name is unknown, you can use the following methods to find configuration files related to removed packages:
-
List All Installed Packages:
You can list all installed packages to see if you can identify the package you are looking for:dpkg -l -
Check for Residual Configuration Files:
You can use the following command to check for any residual configuration files left by removed packages:dpkg -l | grep '^rc'This command lists packages that have been removed but still have configuration files remaining. The
rcstatus indicates that the package is removed but its configuration files are still present. -
Search for Configuration Files:
If you want to search for configuration files in the/etc/directory, you can use:find /etc -type f -name '*<partial_name>*'Replace
<partial_name>with a part of the configuration file name you might remember. -
Using
dpkg-query:
You can also usedpkg-queryto find all files that belong to packages that are no longer installed:dpkg-query -S /etc/* 2>/dev/nullThis command will show you which configuration files in
/etc/belong to which packages, including those that are no longer installed.
By using these methods, you can identify any configuration files related to packages even if you do not remember the exact package name.
