110 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 ...
wisbucky's user avatar
  • 3,388
81 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? ...
Flimm's user avatar
  • 4,218
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 ...
Fox's user avatar
  • 8,193
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 ...
Stephen Kitt's user avatar
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-...
alpha's user avatar
  • 1,994
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-...
Stephen Kitt's user avatar
23 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 ...
Diego Roccia's user avatar
20 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/...
Richard Corfield's user avatar
17 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 ...
Stewart's user avatar
  • 13.7k
16 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....
Chiraag's user avatar
  • 671
15 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 ...
Ferenc Wágner's user avatar
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 ...
Dmitry Grigoryev's user avatar
15 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, ...
muru's user avatar
  • 72.9k
13 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 ...
Stephen Kitt's user avatar
13 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 ...
Stephen Kitt's user avatar
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 ...
Faheem Mitha's user avatar
  • 35.1k
12 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-...
kemotep's user avatar
  • 5,280
11 votes

Given a debian package name, how do I get a URL to the latest .deb URL?

Well, if you had apt available... apt-get -y install --print-uris $PACKAGE | cut -f 2 -d \' | grep \.deb It will actually give you all of the packages needed for whatever it is goign to install. user@...
ivanivan's user avatar
  • 4,955
11 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 ...
Eduardo Trápani's user avatar
10 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 ...
teymourlouie's user avatar
10 votes

Use dpkg to view changelog

If the package is installed, you just go to /usr/share/doc/<package_name>/ and there you will find the upstream ChangeLog and the Debian (package) changelog. Possibly the files are gzipped, in ...
Giacomo Catenazzi's user avatar
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 "...
Simon Richter's user avatar
9 votes

How to get information about deb package archive?

You can use dpkg -f (archive) (field name) to do exactly this. Example: dpkg -f archive.deb Version dpkg -f archive.deb Package To get possible field names: dpkg --info archive.deb
laughing_man's user avatar
9 votes

How to get apt package cache directory location?

The complete location can be obtained as follows: eval $(apt-config shell CACHE Dir::Cache) eval $(apt-config shell ARCHIVES Dir::Cache::archives) echo /${CACHE}/${ARCHIVES} (apt-config shell is ...
Stephen Kitt's user avatar
9 votes

Is it possible to install two services for one package using dh_installinit? How?

You can call dh_installinit multiple times with different --name parameters to install multiple services: override_dh_installinit: dh_installinit --name=service1 dh_installinit --name=...
Stephen Kitt's user avatar
9 votes

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

Even forgetting maintainer scripts, the package might install a Cron script that runs every minute, and the minute might tick over in-between you installing and uninstalling the package. Or it might ...
user253751's user avatar
  • 2,266
9 votes

Circular dependency issues

Packages can have circular dependencies, although as far as the Debian distribution itself is concerned, this should be avoided (and is usually treated as a bug — in kodi’s case, 963865). The package ...
Stephen Kitt's user avatar
8 votes

Is it possible to install two services for one package using dh_installinit? How?

Starting from compatibility level 11, dh_installinit no longer handles systemd services. Use dh_installsystemd instead: override_dh_installsystemd: dh_installsystemd --name=service1 ...
Yd Ahhrk's user avatar
  • 373
8 votes
Accepted

How to create a DEB postinst script that enables a systemd user service?

What you're trying to do doesn't work. Installing a systemd service for the user executing the installation is not very useful since that user would always be root. So instead you should probably ...
Martin Konrad's user avatar
7 votes

Automatically enable systemd services installed using deb?

Actually, you don't need to add anything in override_dh_auto_install. You need --with systemd (without the dash between with and systemd) in the rules and the package dh-systemd installed.
sduthil's user avatar
  • 359

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