About the dpkg
command, a few tutorials do mention of the --unpack
option. According with
jammy (1) dpkg.1 it indicates
--unpack package-file...
Unpack the package, but don't configure it. If --recursive or -R option is specified,
package-file must refer to a directory instead.
Well just how testing, from the MySQL APT Repository page it is possible to get the mysql-apt-config_0.8.24-1_all.deb
file. So in the Downloads
directory I executed the command:
sudo dpkg --unpack mysql-apt-config_0.8.24-1_all.deb
It works with the following message
(Reading database ... 238377 files and directories currently installed.)
Preparing to unpack mysql-apt-config_0.8.24-1_all.deb ...
Unpacking mysql-apt-config (0.8.24-1) over (0.8.24-1) ...
Even when MySQL is installed.
Question
- Where is the unpacked the content of a
.deb
file?
A simple execution of the ls
command only shows the current .deb
file. I expected a kind of extraction. I am assuming a kind of default directory or other something else was used.
If with the -c
option, it is possible to see the directories of the .deb
file I am assuming that the --unpack
option unpacks the .deb
file - if my assumption is incorrect about the latter, please correct me.
If you look at the part immediately about
--unpack
in the manpage (for--install
):Step 4 would seem to indicate that to unpack means to put the files in the package wherever they are supposed to be in the final state of the system. So if the package was supposed to install a
/usr/bin/foo
or an/etc/bar/baz
file, then unpacking will put the corresponding files at those locations.If you wanted to extract the files to the current directory or something like that instead of extracting them to the final installation targets, then the option is
-x
or--extract
: