How do I use the command line interface (not a GUI) to convert the list of dependency packages in the output from apt-cache depends into a space‐separated list for use with apt-get download? Preferably, I’d like the two actions to be executable via a single command.  (By “list of dependency packages”, I’m referring to all packages prefixed by the string “Depends:”.)  The use case is to download all dependent packages of a package onto a machine with Internet access for use on a machine without Internet access as well as to teach myself how to reformat text via the command line.  One example with a long list of dependencies involves the command apt-cache depends gimp, the output of which is shown below. (This example includes a few dependencies listed multiple times, but apt-get download apparently ignores duplicate entries, so there’s no need to filter them out.)  gimp   Depends: libgimp2.0   Depends: libgimp2.0   Depends: gimp-data   Depends: gimp-data   Depends: libgdk-pixbuf2.0-0   Depends: xdg-utils   Depends: libaa1   Depends: libbabl-0.1-0   Depends: libbz2-1.0   Depends: libc6   Depends: libcairo2   Depends: libfontconfig1   Depends: libfreetype6   Depends: libgcc1   Depends: libgegl-0.4-0   Depends: libgexiv2-2   Depends: libglib2.0-0   Depends: libgs9   Depends: libgtk2.0-0   Depends: libgudev-1.0-0   Depends: libharfbuzz0b   Depends: libheif1   Depends: libilmbase23   Depends: libjpeg8   Depends: liblcms2-2   Depends: liblzma5   Depends: libmng2   Depends: libmypaint-1.3-0   Depends: libopenexr23   Depends: libopenjp2-7   Depends: libpango-1.0-0   Depends: libpangocairo-1.0-0   Depends: libpangoft2-1.0-0   Depends: libpng16-16   Depends: libpoppler-glib8   Depends: librsvg2-2   Depends: libstdc++6   Depends: libtiff5   Depends: libwebp6   Depends: libwebpdemux2   Depends: libwebpmux3   Depends: libwmf0.2-7   Depends: libx11-6   Depends: libxcursor1   Depends: libxext6   Depends: libxfixes3   Depends: libxmu6   Depends: libxpm4   Depends: zlib1g   Breaks: gimp-plugin-registry   Recommends: ghostscript     ghostscript:i386  |Suggests: gimp-help-en   Suggests: &lt;gimp-help&gt;     gimp-help-ca     gimp-help-de     gimp-help-el     gimp-help-en     gimp-help-es     gimp-help-fr     gimp-help-it     gimp-help-ja     gimp-help-ko     gimp-help-nl     gimp-help-nn     gimp-help-pt     gimp-help-ru     gimp-help-sl     gimp-help-sv   Suggests: gimp-data-extras   Suggests: gimp-python   Suggests: gvfs-backends     gvfs-backends:i386   Suggests: libasound2     liboss4-salsa-asound2   Replaces: gimp-plugin-registry
2241
I have a friend who has got a computer that is not connected to the Internet. Is there any way to install software offline easily?
1331
So I keep trying to install things on my laptop and whenever I try to use sudo apt-get I get the same errors every  time,  SystemError: E:Read error - read (5: Input/output error), E:The package lists or status file could not be parsed or opened.   Also whenever I try to open software Center through my desktop Icon it will just freeze leaving me to force quit.  If I try to use the command software-center in my terminal I get the longest list in the world which is,   che.open() Traceback (most recent call last):   File "/usr/lib/python2.7/dist-packages/gi/overrides/GLib.py", line 629, in &lt;lambda&gt;     return (lambda data: callback(*data), user_data)   File "/usr/share/software-center/softwarecenter/db/pkginfo_impl/aptcache.py", line 261, in open     self._cache = apt.Cache(progress)   File "/usr/lib/python2.7/dist-packages/apt/cache.py", line 105, in __init__     self.open(progress)   File "/usr/lib/python2.7/dist-packages/apt/cache.py", line 150, in open     self._cache = apt_pkg.Cache(progress) SystemError: E:Read error - read (5: Input/output error), E:The package lists or status file could not be parsed or opened. 2013-10-13 10:13:52,685 - softwarecenter.db.pkginfo_impl.aptcache - INFO - aptcache.open() Traceback (most recent call last):   File "/usr/lib/python2.7/dist-packages/gi/overrides/GLib.py", line 629, in &lt;lambda&gt;     return (lambda data: callback(*data), user_data)   File "/usr/share/software-center/softwarecenter/db/pkginfo_impl/aptcache.py", line 261, in open     self._cache = apt.Cache(progress)   File "/usr/lib/python2.7/dist-packages/apt/cache.py", line 105, in __init__     self.open(progress)   File "/usr/lib/python2.7/dist-packages/apt/cache.py", line 150, in open     self._cache = apt_pkg.Cache(progress) SystemError: E:Read error - read (5: Input/output error), E:The package lists or status file could not be parsed or opened. 2013-10-13 10:13:57,365 - softwarecenter.db.pkginfo_impl.aptcache - INFO - aptcache.open() Traceback (most recent call last):   File "/usr/lib/python2.7/dist-packages/gi/overrides/GLib.py", line 629, in &lt;lambda&gt;     return (lambda data: callback(*data), user_data)   File "/usr/share/software-center/softwarecenter/db/pkginfo_impl/aptcache.py", line 261, in open     self._cache = apt.Cache(progress)   File "/usr/lib/python2.7/dist-packages/apt/cache.py", line 105, in __init__     self.open(progress)   File "/usr/lib/python2.7/dist-packages/apt/cache.py", line 150, in open     self._cache = apt_pkg.Cache(progress) SystemError: E:Read error - read (5: Input/output error), E:The package lists or status file could not be parsed or opened.   That's only about one-tenth of the list which is too long to read. I need help, if anyone has an answer please respond
108996
In order to install tmux 2.1, I needed to install libtinfo5 version 6, I did this by downloading a .deb archive containing libtinfo5 and installing directly with command:  sudo dpkg -i libtinfo5_6.0+20160213-1ubuntu1_amd64.deb   This satisfied tmux 2.1's dependency and tmux installed ok. Now I tried to install vnstat using  sudo apt-get install vnstat    apt-get error exited with the following  $ sudo apt-get install vnstat Reading package lists... Done Building dependency tree        Reading state information... Done You might want to run 'apt-get -f install' to correct these: The following packages have unmet dependencies:  libncurses5 : Depends: libtinfo5 (= 5.9+20150516-2ubuntu1) but 6.0+20160213-1ubuntu1 is to be installed  libncursesw5 : Depends: libtinfo5 (= 5.9+20150516-2ubuntu1) but 6.0+20160213-1ubuntu1 is to be installed E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).   My understanding has always been that Ubuntu's package management system was capable of installing and managing multiple versions of the same package, for situations exactly like this.  In other words apt/dpkg recognises   tmux needs libtinfo5 - version 6 to work vnstat needs libtinfo5 - version 5 to work   Then apt/dpkg say's ok, I'll install both versions. I can see how certain programs like a system binary, e.g. bash or ls can only be installed once as most invocations simply say bash -c "&lt;command&gt;" and not bashv.3.2 -c "&lt;command&gt;". So my question is can the package manager install and manage multiple dependencies?, or is this just not possible because, like in the bash example above, most programs make a call to the dependency by the dependencies name without specifying version. In which case the issue is beyond the control of the package manager (i.e. its more of a programming compilation/configuration/organisation issue) and the package manager gives up at that point?
97053
It is not about the common download &amp; install thing, what apt (aptitude, etc) does, it is a scripted download a package file.  I found the dget tool for this task, which works quite well. But, unfortunately, it doesn't have any option to specify a different repository URL as it is given in the /etc/apt/sources.list.  Is it somehow possible? Actually, a dget-like functionality would be the best, but where I can also specify the repo URL.    P.s. thank you very much the scripts, but I would like to prefer a debian tool for this very simple task. It will be part of a buildscript, for external usage, and any unneeded complexity has intolerable collateral costs. It must be done by a debian tool.  P.s.2. Finally I solved this with updating the system-wide repos, and downloading the packages with dget. Thank you very much the scripts!
13558
I'd like to output a list of all installed packages into a text file so that I can review it and bulk-install on another system.  How would I do this?
31275
I cannot install any package. It seems the command apt-get update must be run but it throws some errors:  $ sudo apt-get update Get:1 http://security.ubuntu.com/ubuntu xenial-security InRelease [102 kB]      Hit:2 http://ve.archive.ubuntu.com/ubuntu xenial InRelease                      Hit:3 http://ve.archive.ubuntu.com/ubuntu xenial-updates InRelease              Hit:4 http://ve.archive.ubuntu.com/ubuntu xenial-backports InRelease            Fetched 102 kB in 23s (4337 B/s)                                                *** Error in `appstreamcli': double free or corruption (fasttop): 0x000000000210f4b0 *** ======= Backtrace: ========= /lib/x86_64-linux-gnu/libc.so.6(+0x777e5)[0x7fac8d8317e5] [...] Aborted (core dumped) Reading package lists... Done E: Problem executing scripts APT::Update::Post-Invoke-Success   'if /usr/bin/test -w /var/cache/app-info -a -e /usr/bin/appstreamcli;   then appstreamcli refresh &gt; /dev/null; fi' E: Sub-process returned an error code
100345
I want to install a package (DigiKam), but it has a lot of dependencies. If I decide I no longer need this software and uninstall it, will the now unnessary dependencies be removed?  If not, how can I do it manually?
57613
I'd like to find out which packages  sudo apt-get build-dep &lt;package&gt;   would install (if I already got some dependencies installed, I'd also like to see those → so running or simulating the above is not enough). Command line preferred.
22282
Okay, I understand how I may use apt-get {install|upgrade|remove} mypackages to install, upgrade, or remove binaries as well as their configuration data files and dependencies (actually, remove will only remove the binaries unless additional flags are provided).  I am not looking for how it is used as the man describes this, but high level what it is doing.  My end goal is to create a means for me to install and manage some custom software (created by a make file) on multiple remote machines, and I need to learn more about the process.  If answers to this question are based on which distribution is used, please tailor to Debian.  In addition to generally how it works, I have the following specific questions:   How does the client that is accessing the apt repository keep track of the files? Must the repository be hosted on the same operating system (i.e. can apt repository be hosted on redhat)? How are the locations to install files specified?  Is this specified by the .deb file? How is a remote machine accessing the repository?  Is it just ftp(s) or http(s)? Is the machine that is hosting the repository running special software (like gitlab for a git repository), or is it just some structured file system?
7284
I'm getting the following error message when attempting to install libglew-dev,  Reading package lists... Done Building dependency tree        Reading state information... Done Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation:  The following packages have unmet dependencies:  libcheese-gtk23 : Depends: libclutter-gtk-1.0-0 (&gt;= 0.91.8) but it is not going to be installed                    Depends: libcogl15 (&gt;= 1.15.8) but it is not going to be installed  libcheese7 : Depends: libclutter-gst-2.0-0 (&gt;= 0.10.0) but it is not going to be installed               Depends: gstreamer1.0-clutter but it is not going to be installed  libclutter-1.0-0 : Depends: libcogl-pango15 (&gt;= 1.15.8) but it is not going to be installed                     Depends: libcogl15 (&gt;= 1.15.8) but it is not going to be installed E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.   All those packages are however apparently already installed.  I have tried all possible solutions in  post, without any luck. I have not added any PPAs. The version of ubuntu is 14.04.2.  I have looked at similar posts, and tried the following:  Running  dpkg --get-selections | grep hold   prints nothing.  sudo apt-get -oDebug::pkgProblemResolver=true install -f   Gives me nothing of interest, 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
77158
Say I install package A, which depends on package B. Then I remove A.  Now apt-get autoremove wants to remove B, but I want to keep it. How do I "pin down" B so that the system acts as if I installed B myself?  I come from Gentoo, where the solution would be to add B to my world file. What's the Debian/Ubuntu equivalent?
15367
I have a fresh install of Lubuntu and would like to install packages from a given list, without having to type sudo apt-get install package_name. Is it possible?  I'm not talking about the post-install scripts, that is something entirely different.
45925
I'm painfully watching my apt dist-upgrade command download each package in a very long list, and what makes it painful is that packages are downloaded one-by-one. I fail to see why this process couldn't be sped up by downloading multiple packages simultaneously!  For example, if apt is downloading Chrome (PPA), Syncthing (PPA), and Ubuntu system updates (non-PPA), three simultaneous downloads will begin, one for Chrome, one for Syncthing, and one for the Ubuntu system updates.  Since all update packages are downloaded before any installation even begins, I don't see any reason why multiple packages for Ubuntu system updates coming from a single repository can't be downloaded in parallel.  I would really like to know if anyone knows a way to make this happen? Can I downloaded multiple package upgrade files in parallel from a single repository when running apt dist-upgrade or apt upgrade?
81496
Right now I have 2 computers:   Has connection to the internet and has installed package A. Doesn't have connection to the WEB. On this PC I need to install package A.   I decided to download all needed packages using first PC and transfer them to the second PC via USB. I have searched how to get all needed packages for some deb installation and .  But when I run:  apt-get --print-uris --yes install A | grep ^\' | cut -d\' -f2 &gt; downloads.list   on first PC I got empty file because this package is already installed there (and I don't want to uninstall it).  Also package A is very complicated and depends on package B which depends on package C and package C is not installed on the second PC.  So how can I download all needed packages? Or is there any other way of installing it?
22656
I have tried searching for this but there seems to be no command that can output a list of packages (ideally in Ubuntu) that I have installed, not including any dependencies.
32448
How can I check dependency list for a deb package. I am running Ubuntu 11.10 and I have backed up all deb packages from var/cache/apt/archives. I want to format my pc and re-install selected applications only. Also how can I get the list of installed packages and dependencies.
83777
I want to install a single package (and its dependencies, but only to the extent those are not satisfiable in Wheezy) from Debian Jessie onto my Wheezy system, without upgrading "everything and the kitchen sink" to the Jessie versions. Specifically, I'd like to install , which is available packaged in Jessie but not in Wheezy.  Everything I've found indicates that I should add the Jessie repositories to my sources list, set pinning to keep everything at wheezy and only take the single package from jessie, and it'll pretty much just fall into place. However, it isn't falling into place for me. If I create /etc/apt.d/sources.list.d/jessie.list with the following content:  deb ftp://ftp.debian.org/debian/ jessie main deb-src ftp://ftp.debian.org/debian/ jessie main   and then create /etc/apt/preferences.d/jessie with:  Package: * Pin: release a=wheezy Pin-Priority: 1001  Package: kpcli Pin: release a=jessie Pin-Priority: 450   and run apt-get -u update followed by apt-get -u install kpcli/jessie, then I expect apt-get to pull in kpcli and maybe a small handful of other packages from Jessie, and leave the remainder of my installed system untouched. (My system is a fully up to date installation of Wheezy.) Alternatively, if I got the pin priority too low, I'd expect it to do nothing. Rather, on my system, apt-get wants to upgrade several hundred packages.  What, exactly, is needed to install just this one single package of a Jessie version while leaving the remainder of my Wheezy system untouched?  Note that in this particular case, the software is actually written in Perl so there's no compilation to binary or anything like that involved; however, there is a handful of Perl module dependencies. Hence, one possible alternative would be to install the .deb (downloaded manually) using something that only (1) allows specifying a single, local .deb archive that is to be installed, like dpkg -i, and (2) handles dependencies in an intelligent way, which plain dpkg -i doesn't. However, for all the searching I've done on several occasions and failed to come up with a simple-to-follow guide for how to do this, a generic solution (one that works for binary, compiled packages as well) would be great.