Hot answers tagged

1389 votes
Accepted

How to install a deb file, by dpkg -i or by apt?

When you use apt to install a package, under the hood it uses dpkg. When you install a package using apt, it first creates a list of all the dependencies and downloads it from the repository. Once the ...
  • 14.1k
120 votes

How to install a deb file, by dpkg -i or by apt?

Install your foo.deb file with dpkg -i foo.deb. If there are some errors with unresolved dependencies, run apt-get install -f afterwards.
95 votes

How to install a deb file, by dpkg -i or by apt?

You can install a local .deb package by: sudo apt install ./foo.deb Make sure to specify a local relative or absolute path (./ if in current dir), otherwise it will look for foo.deb in the remote ...
  • 2,718
79 votes

How to install a deb file, by dpkg -i or by apt?

Here's the best way to install a .deb file on Ubuntu on the command-line: sudo gdebi skype.deb If you don't have gdebi installed already, install it using sudo apt install gdebi-core. Why gdebi? ...
  • 3,656
67 votes
Accepted

How to get information about deb package archive?

You can use dpkg-deb command to manipulate Debian package archive (.deb). From manpage:- -I, --info archive [control-file-name...] Provides information about a binary package archive. ...
  • 22.4k
29 votes

Equivalents to '.msi' and to 'setup.exe' files in Debian or Ubuntu?

Probably closer to an MSI installer than a setup.exe, a .deb package includes a tree of files to copy into the filesystem, as well as a collection of pre- and post-installation hooks to run (among ...
  • 7,769
26 votes
Accepted

Is it safe to rename .deb file named by the standards?

Over the years, I’ve accumulated a large number of .deb packages with non-standard names, and I don’t remember running into any problems. “Famous” packages with non-standard names that people might ...
25 votes
Accepted

How may I obtain information on a specific Debian package (.deb) file?

To get lots of information about the package use -I or --info: dpkg-deb -I package.deb dpkg-deb --info package.deb To only get the version use, -f or --field: dpkg-deb -f package.deb Version dpkg-...
  • 1,904
24 votes
Accepted

Can installing an unknown deb package using sudo dpkg be harmful?

Yes, packages can contain “maintainer scripts” which are run before and/or after installation. You can see the scripts, if any, by extracting the control archive from the package: dpkg-deb --ctrl-...
20 votes
Accepted

Use dpkg to view changelog

dpkg does not provide any facility to read the changelog of a package. you should extract the package and read the changelog dpkg -X <package.deb> <folder> then you can read the ...
19 votes
Accepted

How to fix "apt-get install -f apt-transport-https" error: 404 Not Found?

I appear to have fixed the issue by symlinking the https dir in /usr/lib/apt/methods to the http dir. root@validator-dev-group-c2v4:~# cd /usr/lib/apt/methods root@validator-dev-group-c2v4:/usr/lib/...
17 votes
Accepted

What is the meaning of the tilde in some debian openjdk package version string?

The official reference for the Debian package version format is in the Debian Policy Manual. The format is designed to allow “reasonable-looking” version numbers with a well-defined (if somewhat ...
16 votes
Accepted

How to check from bash if package exists in Debian

(the below is from Ubuntu, but the same technique obviously works on Debian as well) $ apt-cache show screen Package: screen Priority: optional Section: misc Installed-Size: 950 Maintainer: Ubuntu ...
  • 9,110
15 votes

Equivalents to '.msi' and to 'setup.exe' files in Debian or Ubuntu?

Single-file binary installers I have seen on Linux were .sh files which contained a shell script concatenated with a binary blob, like this: #!/bin/bash tmpdir=$(mktemp -d /tmp/installer.XXX) tail -n ...
14 votes

How to install a deb file, by dpkg -i or by apt?

Check the dependencies with dpkg -I my.deb and apt-get install the dependencies before dpkg -i my.deb. May be you can copy the my.deb in /var/cache/apt/archives and install it directly with apt-get ...
  • 2,476
14 votes

List top level manually installed packages without their dependencies

This could be done using the Python apt API. The packages you see in apt-mark showmanual are exactly the ones in apt.cache.Cache() for which is_installed is true and is_auto_installed is false. But, ...
  • 65.5k
13 votes
Accepted

After creating a .deb: dpkg:warning while removing, directory /usr/local/bin not empty so not removed

In general, this warning is completely harmless and normal. When dpkg is removing (or trying to remove) a package, it removes all files and directories which were created as part of that package ...
  • 33.7k
13 votes
Accepted

Create PKGBUILD from .deb

Yes, it will work in the same way as other PKGBUILDs with binary sources - extract it and copy files. The only thing which should be mentioned is that deb-archive consists of 3 other files - debian-...
  • 3,912
13 votes
Accepted

How to get ALL kinds of reverse package dependencies: reverse-depends pendant for non-Ubuntu distributions

In Debian and derivatives there are six types of dependencies: pre-depends depends recommends suggests build-depends build-depends-indep Each of these give corresponding reverse dependencies. To ...
13 votes
Accepted

How to prevent debuild from performing a clean?

Add the -nc option to your debuild command line. This may expose problems in the build system or the packaging though, so be prepared. But for small fixes it usually works fine. However, as the ...
12 votes
Accepted

How to change folder permissions during package installation

I'm not sure what the behaviour is in Ubuntu, but in general for a .deb package containing files or directories with non-standard permissions you need to ensure those permissions are set after ...
12 votes
Accepted

Why was `apt` made when we already have `apt-get`?

apt is mostly intended as a new binary with some of the commonly used features of both apt-get and apt-cache (with more to be added later, probably), and with a "simplified" interface. Most of APT's ...
  • 33.7k
11 votes

dpkg-deb: error: control directory has bad permissions

If your control directory is on NTFS file system, you will get this error. In fact, your file system should support file permissions. So the first advice is to copy your files somewhere in your home ...
11 votes
Accepted

How to generate the `Release` file on a local package repository?

There are a number of ways of going about this; I use apt-ftparchive. Create an aptftp.conf file in the root of your repository: APT::FTPArchive::Release { Origin "Your origin"; Label "Your ...
11 votes

How to temporarily disable and permanently disable repos in Debian based systems?

The easiest way I've found to manage repos is to have them in individual files in /etc/apt/sources.list.d/. That way, disabling the repo is as easy as moving the file from /etc/apt/sources.list.d/repo....
  • 576
10 votes
Accepted

Is it possible to have a Debian package pre-install script run apt-get commands?

I don't think its possible directly. But somehow the user got your package to install—and apparently not from your repository, since it hasn't been added yet. So the first workaround I'd suggest ...
  • 104k
10 votes

Is it safe to rename .deb file named by the standards?

The file names are standardized mainly for the benefit of the archive maintenance software and the local cache. In the old days, before the m68k architecture was added to Debian, file names used "...
10 votes
Accepted

What difference between dpkg-buildpackage and debuild?

The difference between those two is that debuild is several tools in one whereas dpkg-buildpackage is just 1 step in the Debian package building process. Debuild is a front-end wrapper for dpkg-...
  • 4,798
10 votes

How can I publish a deb package?

You have a few options: Post an RFP (Request for packaging) on Debian's WNPP. Describe your package and where to get it. Offer support since you are the developer. If a Debian Developer takes an ...
  • 9,866
10 votes

What does a tilde (~) mean at the end of a dependency requirement in a deb file or in apt?

The documentation on the Version control field states (see the page for the full algorithm): First the initial part of each string consisting entirely of non-digit characters is determined. These two ...

Only top scored, non community-wiki answers of a minimum length are eligible