Tag Info

Hot answers tagged

142

(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 ...


123

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


111

$ 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


63

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 ...


59

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 ...


58

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, ...


48

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.


37

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 ...


33

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


30

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


30

or dpkg --print-architecture


29

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 < ...


26

Simplest, but might show a few extraneous packages and 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' | sed -n 's/^install ok ...


25

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.


25

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 file.name. dlocate is a fast alternative to dpkg -L (the ...


22

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.


21

This has been fixed in the upcoming Natty version of Ubuntu: https://launchpad.net/ubuntu/natty/+source/software-properties/0.78.1 Those using an older version need to edit ppa.py: sudo gedit /usr/lib/python2.6/dist-packages/softwareproperties/ppa.py Where it says: keyserver.ubuntu.com change to: hkp://keyserver.ubuntu.com:80 Save, exit, then ...


18

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 ...


17

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 ...


17

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 ...


17

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 ...


16

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


16

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 ...


16

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 ...


15

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 ...


14

dpkg-architecture -qDEB_HOST_ARCH


11

From the description of the package tofrodos in synaptic: Tofrodos comprises one program, "fromdos" alias "todos", which converts text files to and from these formats. Use "fromdos" to convert DOS text files to the Unix format, and "todos" to convert Unix text files to the DOS format. What is wrong with dos2unix and unix2dos is beyond me, and I ...


10

$sudo apt-get update This will update the list of available packages from the server.


10

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...


9

apt-show-versions It also gives you info about the package state (up to date, upgradable, ...) This program is separately packaged in the apt-show-versions package. Install it first with: apt-get install apt-show-versions



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