Hot answers tagged

4

There are a few routines, old wives' tales, for finding and then cleaning out unnecessary packages, in additon to the already suggested debfoster. (first) but, why is that package installed? A tool you will want to use while cleaning out packages is aptitude why pkg-name From the aptitude man page: $ aptitude why kdepim i nautilus-data Recommends ...


3

To get a list of all the files installed by a package, you can use dpkg -L <package_name> In your case dpkg -L nginx-light will list all the files installed by the package. Look at that list to know where the executable has been installed. Also, if you know the executable's name beforehand, you can filter the list of files with grep: dpkg -L ...


2

Speaking about Debian-derived distributions: They can differentiate multiple architectures within the same repository (including 32bit vs 64bit). The kernel modules are stored in a kernel-specific tree /lib/modules/$(uname -r)/ so you could build a package that included a module for all your possible different kernel versions and the right one would be ...


2

This can be found in the file /var/log/dpkg.log. Use this command to generate a list: awk '$3=="upgrade"' /var/log/dpkg.log* Example output: 2015-12-30 15:33:15 upgrade firefox 38.0+build3-0ubuntu0.12.04.1 43.0+build1-0ubuntu0.12.04.1


2

This won't help with your existing dev packages, but for future use, consider using mk-build-deps (in the devscripts package) to generate a meta-package for the dependencies. mk-build-deps needs just the name of an available package, or its control file. The latter is useful if your package isn't (yet) available or if you are adding new dependencies. It ...


2

Simpler oneliner: yum -q list installed packageX &>/dev/null && echo "Installed" || echo "Not installed"


1

If you install emacs24 explicitly, you should then be able to M-x package-install: sudo aptitude install emacs24


1

Use dpkg -L chntpw to show package contents, then look for paths in /usr/bin, /bin/ etc. e.g dpkg -L wget shows the following output, # dpkg -L wget /. /usr /usr/bin /usr/bin/wget /usr/share /usr/share/doc /usr/share/doc/wget /usr/share/doc/wget/README /usr/share/doc/wget/changelog.Debian.gz /usr/share/doc/wget/AUTHORS /usr/share/doc/wget/MAILING-LIST ...


1

@terdon's answer is great but it is even easier to do this using dpkg-query which unlike apt-file is installed by default on Debian systems. ldd /bin/bash | awk '/=>/{print $(NF-1)}' | while read n; do dpkg-query -S $n; done | sed 's/^\([^:]\+\):.*$/\1/' | uniq This produces a list of packages.


1

Virtual packages and the Debian alternatives system (which is where binaries come into play) are related but not the same. For virtual packages, you can use apt-cache to find which (real) packages "provide" it: $ apt-cache showpkg awk Package: awk Versions: Reverse Depends: base-files,awk base-files,awk Dependencies: Provides: Reverse Provides: ...



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