View content files of .deb archive
Asked Answered
H

3

9

I want to view the content of a .deb archive but I´m not able to unpack the .deb file with any pack program like 7Zip. When I try to install the file in Linux Ubuntu with dpkg-deb the system return the message "...is not a debian format archive".

How can I unpack this .deb file to get the content files?

Test.deb

Halfbreed answered 16/12, 2018 at 22:16 Comment(0)
T
7

To view the content files of .deb file use the -c option:

dpkg-deb -c file.deb

Syntax:

Usage: dpkg-deb [<option> ...] <command>

See the dpkg-deb --help.

To unpack the .deb file use -x option or -X (with verbosity):

mkdir pkg_dir
dpkg-deb -x file.deb pkg_dir/ 

To install a trusted .deb file use dpkg , apt or gdebi (need to be installed)

dpkg -i file.deb

The file command allow you to determine the file type :

file file.deb

It should print :Debian binary package

Tenfold answered 21/12, 2018 at 11:37 Comment(0)
E
7

On windows you can view the contents of a .deb with 7-zip, however to fully view the contents you shouldn't use 'Open archive' from the context menu of Explorer.

You should open the 'Open archive' sub-menu and then click the '*'. This opens the archive with both the data.tar.xz and the control.tar.xz visible in the root.

Extrusion answered 22/12, 2020 at 13:57 Comment(1)
And if files within are using "zstandard" compression (.tar.zst filetype), you can use this 7-zip fork that supports more compression types: github.com/mcmilk/7-Zip-zstdMeister
S
4

A deb package is an ar archive file, that contains two tar files inside. I am not sure about Windows programs, but I suspect WinRAR may be able to extract this file.

On Ubuntu, the built in archive manager can open any deb file. Just right-click it and select "open with archive manager".

If you are unable to install or open this file, it is likely the file is corrupted or incomplete.

The link you provided is not working, but the error seems clear - what you have is not a deb file, at least not a correct one.

Sunbreak answered 16/12, 2018 at 22:25 Comment(2)
Thank you for your answer. Yes it seems that the file is not an deb file because I have 20 other deb files which are not able to open with any archive manager in Ubuntu or Windows. So I think the file is not an deb file but is only named .deb. Is there any other possibility to get the content of this file?Halfbreed
@Halfbreed it depends on what kind of file it really is. On Ubuntu, open a terminal window in the folder where the deb is, and type file Test.deb file is a utility that tries to identify file type by its content. It has a big database of file types, it may be able to shed some light on what you have.Sunbreak

© 2022 - 2025 — McMap. All rights reserved.