I have a .deb file that I want to unpack and examine, but not install. I'm currently looking for where i can download dpkg for OSX, but can't find it. If you have a link, please share.
-
@Am1rr3zA - Thanks for adding the tags. I need +7 more reputation before I'm able to lol.– ThomasAug 30, 2010 at 19:19
6 Answers
ar
is already installed on my mac on OS X. So just do
ar -x path/to/deb/file.deb
that's it. No need to install other software.
-
1Users of XCode 4 can run
/Applications/Xcode.app/Contents/Developer/usr/bin/ar
.– zpletanApr 2, 2013 at 18:19 -
-
1
ar
comes from XCode (unless you installed it with MacPorts/Homebrew/etc), but XCode 4 comes from the App Store and therefore doesn't install anything in /usr/bin by default. I think you can change it from preferences, but that's the default.– zpletanApr 3, 2013 at 15:58 -
@zpletan I've never installed anything in
/usr/bin
, soar
must be from the default installation. (Unless I am totally mistaken.)– topskipApr 3, 2013 at 20:09 -
2This doesn’t generally work. I’ve got a
.deb
file that unpacks beautifully withdpkg
butar
fails because it thinks the package contains a different set of folders, with different names, than it actually contains. Oct 12, 2017 at 10:58
While not OSX specific, if you have Docker for Mac installed, you could use an Ubuntu container to look inside the contents of the package:
docker run -it -v $(pwd):/data ubuntu:latest /bin/bash
dpkg -c /data/foo.deb
-
got a typo in spelling ubuntu though. But I have used your solution. Oct 25, 2021 at 7:30
At least on recent macOS versions, you can also use tar
to extract UNIX archives:
tar xf package.deb
if you use MacPorts you can install dpkg and more package (like do it in debian or ubuntu).
after installing Macports go and install dpkg from here.
also you can find more info about dpkg in osx here. (This is now down - I don't know if temporarily or permanently)
-
+1 for the reply. I couldn't get DarwinPort download page to load so I just used MacPorts. Thanks!– ThomasAug 30, 2010 at 20:10
-
-
6DarwinPorts.com is a rip off of MacPorts.org. MacPorts.org used to be at DarwinPorts.org - see trac.macports.org/wiki/DarwinPortsFraud– ChealionAug 31, 2010 at 2:58
docker run -it -v $(pwd):/data ubuntu:latest /bin/bash
# or with fish
# docker run -it -v (pwd):/data ubuntu:latest /bin/bash
cd data
dpkg -x wkhtmltox_0.12.6-1.focal_amd64.deb out
ls out/usr/local/bin/
works well for wkhtmltoimage and wkhtmltopdf
-
This is the same as apple.stackexchange.com/a/418659/237 or if extra information it should be an edit to that– mmmmmmMay 1 at 16:40
-
-
Then I think it would make sense to describe why it is different and the benefit. People shouldn't be copying code without understanding it so an explanation should always be given– mmmmmmMay 2 at 18:12