Hot answers tagged


(Debian/Ubuntu) Discover what package a file belongs to: dpkg -S /usr/bin/ls 'dpkg -S' just matches the string you supply it, so just using 'ls' as an argument matches any file from any package that has 'ls' anywhere in the filename. So usually it's a good idea to use an absolute path. You can see in the second example that 12 thousand ...


$ man apt-get | grep reinsta -A2 --reinstall Re-Install packages that are already installed and at the newest version. Configuration Item: APT::Get::ReInstall. So, to use it to reinstall aptitude use: sudo apt-get install --reinstall aptitude


apt-file search filename or apt-file search /path/to/file To install apt-file, use: sudo apt-get install apt-file You will need to update its database before you can use it: sudo apt-file update


usually I do dpkg -i <deb file>, it'll fail saying it needs dependencies. After that when you do an apt-get update it'll say at the end something like "dependencies are ready to install" I think it then advises to use apt-get install -f. Once that's done, I use dpkg -i again. Worked fine for me last few years. edit: looking a bit further, ...


aptitude and apt-get work the same for many tasks, but for the most tricky cases, such as distribution upgrades (apt-get dist-upgrade vs. aptitude full-upgrade), they have different rules, and aptitude's rules are nearly always better in practice where they disagree. The reason you see more documentation for apt-get over aptitude is mostly inertia: aptitude ...


You can reinstall a package with sudo apt-get install --reinstall packagename. This completely removes the package (but not the packages that depend on it), then reinstalls the package. This can be convenient when the package has many reverse dependencies.


I think it's referring to apt-get moo: $ apt-get moo (__) (oo) /------\/ / | || * /\---/\ ~~ ~~ ...."Have you mooed today?"... To quote Wikipedia: aptitude states that, unlike Advanced Packaging Tool, it "does not have Super Cow Powers". In apt-get "super cow powers" can be found by issuing the command ...


Sirex has it more or less correct, but his answer isn't clear. I just solved this, so here's what I did: sudo dpkg -i /path/to/filename.deb If this fails with a message about the package depending on something that isn't installed, you can probably fix it if you run sudo apt-get -f install This will install the dependencies (assuming they're available ...


or dpkg --print-architecture


user@host:~$ dpkg-query -S /bin/bash bash: /bin/bash Where bash is the package name.


try dpkg -l it lists you the packages, version and a short description.


You can also install .deb file using gdebi.Run the below commands to install gdebi, sudo apt-get install gdebi-core Install .deb packages with gdebi, sudo gdebi /path/to/filename.deb It also fix dependencies.


The simplest way is using dpkg, but it might show a few extraneous packages and it truncates long package names and version numbers: dpkg -l To list only correctly installed packages and not truncate names: dpkg -l | grep '^ii' To get more control over the output format, you can use dpkg-query: dpkg-query -W -f '${status} ${package} ${version}\n' | \ ...


On any Debian based machine, this is one common way to duplicate a package set. On the old machine: dpkg --get-selections "*" > my_favorite_packages Copy the file my_favorite_packages to the new machine (a thumb drive is a good option, but scp also works fine). Then run this sequence (with root privileges): apt-get update dpkg --set-selections < ...


This has been fixed in the upcoming Natty version of Ubuntu: Those using an older version need to edit sudo gedit /usr/lib/python2.6/dist-packages/softwareproperties/ Where it says: change to: hkp:// Save, exit, then you'...


There are several utilites in Debian which perform this task; check this page for a description. I'll mention two of them, apt-file and dlocate. apt-file searches its internal cache, thus allowing you to not install all the packages you want to search. Search is performed by launching apt-file search dlocate is a fast alternative to dpkg -L (the ...


The source lines look exactly the same as the normal package lines, they just say deb-src instead of deb. so just copy the ones you have now and change them to be deb-src. Update - You may also need to apt-get update after adding the deb-src lines.


aptitude makes it convenient to show what programs in a search you already have installed on the system (with the help of grep): aptitude search flash | grep ^i Actually, aptitude's search is far more powerful than what you get piping through grep, as it supports contextual searching: e.g., this finds all packages with 'flash' in the package name that ...


There was a recent security issue in Samba (Feb 5 2010), a claimed zero-day exploit that exploited an insecure default configuration. According to an Ubuntu Forums post on the topic, the "wide links" option now defaults to no. Apparently the option's name was changed since those earlier instructions you found. Adding this to the global section of your ...


Indeed, lets break this down. sudo (some parameters): Instructs the operating system to execute the parameters as a command, but do so with administrative (usually root) privileges. apt-get (some parameters): Runs the package manager called apt-get on your machine. The parameters are a command for apt-get to run. install xyz: These parameters to apt-get ...


None of the other answers worked for me on Maverick. In my case, I found this worked: sudo rm /var/lib/dpkg/info/flashplugin-nonfree.prerm sudo dpkg --remove --force-remove-reinstreq flashplugin-nonfree (replacing "flashplugin-nonfree" with the name of the broken package, and replacing "prerm" with the type of script that failed - in my case it was "...


After reading info page of aptitude and a dozen of attempts, I finally got this : aptitude search '?narrow(?installed,?not(?archive(testing)) ?archive(unstable))' or (equivalent) : aptitude search '~S ~i (!~Atesting ~Aunstable)' It will search packages installed from unstable archives of any repository. You have to filter out packages from your default ...


Another alternative: $ dpkg -S /bin/bash bash: /bin/bash On my Ubuntu at least, both seem to be in the dpkg package, so no real advantage to any specific one...


You can place files in /etc/apt/sources.list.d. This is described in the man page for sources.list (type man sources.list). The man page says: SOURCES.LIST.D The /etc/apt/sources.list.d directory provides a way to add sources.list entries in separate files. The format is the same as for the regular sources.list file. File names need to end with ....


You can configure apt to restrict its download speed by setting a configuration file in /etc/apt/apt.conf.d/, as detailed in this post Specifically, create a file: /etc/apt/apt.conf.d/76download that contains the text: Acquire { Queue-mode "access"; http { Dl-Limit "65"; }; }; where "65" is the speed in kb/s


dpkg-architecture -qDEB_HOST_ARCH


For other applications with no auto bandwidth control option, you can use trickle Example for APT with upload rate of 20 KB/s and download rate of 50 KB/s (you need sudo trickle): sudo trickle -u 20 -d 50 aptitude dist-upgrade Example for wget with download rate of 30 KB/s: trickle -d 30 wget http://... From trickle's man page: trickle is a ...


sudo apt-key adv --keyserver --keyserver-options http-proxy=http://proxy:port --recv-keys KEYID


sudo apt-get install libevent-dev Will do it.

11 is what I always use to accomplish this task. It is superior over apt-file because it can find parts of filenames as well. It's also linked up to the main packages list which will list descriptions, bugs, etc. All in all a good website. Not as useful from the command line, but still quite useful. For speed, I bookmarked the url: ...

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