select related packages in apt --upgradeable to install selectivelyHow to select an incomplete range of...

If you pass through the order of colors in Prismatic Wall one way, do you reverse the order of colors passing through the other way?

Should I replace the battery terminal clamp if some material is missing?

Moving objects and gravitational radiation

Would a spacecraft carry arc welding supplies?

Prisoner's dilemma formulation for children

When and why did the House rules change to permit an inquiry without a vote?

Stare long enough and you will have found the answer

In this day and age should the definition / categorisation of erotica be revised?

Why do baby boomers have to sell 5% of their retirement accounts by the end of the year?

Is it unusual that English uses possessive for past tense?

How can a stock trade for a fraction of a cent?

Fantasy series about a human girl with gold tattoos who makes too much blood

Which person is telling the truth?

Are my triangles similar?

Can Microsoft employees see my data in Azure?

I can use x = y = z. Why not x < y < z?

Is it really better for the environment if I take the stairs as opposed to a lift?

FPGA starts working after irrelevant changes, why?

What plausible reasons why people forget they didn't originally live on this new planet?

How can I seal 8 inch round holes in my siding?

Was Hitler exclaiming "Heil Hitler!" himself when saluting?

Given a fibonacci number , find just next fibonacci number

Are there any Baryons that have quark-antiquark combinations?

Why doesn't English employ an H in front of the name Ares?



select related packages in apt --upgradeable to install selectively


How to select an incomplete range of packages with apt?apt: Install all php packages whatsoeverRelated to apt-get update commandapt: install packages downloaded previouslySelectively build packages with dpkg-buildpackageCan't install any packages with aptHow to select an incomplete range of packages with apt?debian9 can't install python packages with pip3 or uninstall packages with aptapt will not install any packages from newly added reposWhy does apt install or uninstall other packages implicitly?apt: Install all php packages whatsoever






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{
margin-bottom:0;
}








0

















Running Debian I often come across a flood of packages that could be upgraded. I don't want to just apt upgrade without doing it carefully so I want to install 'non-serious' packages first (with their associated libs, etc. - in groups), before I look at the 'serious' ones.



A hacky way of doing that is at the end of this question, but I'm sure there are better ways, as well as possibly this question bringing to light better ideas or concerns.



QUESTION: How can I install subgroups of related packages all together, from apt list --upgradeable?



If here is the output of the above command;



apparmor/testing 2.13.3-5+b1 amd64 [upgradable from: 2.13.3-5]
gir1.2-atk-1.0/testing 2.34.1-1 amd64 [upgradable from: 2.34.0-1]
gir1.2-totem-1.0/testing 3.34.1-2 amd64 [upgradable from: 3.34.0-1+b1]
gjs/testing 1.58.1-1 amd64 [upgradable from: 1.58.0-2]
gnome-calculator/testing 3.34.1-1 amd64 [upgradable from: 3.34.0-1]
graphviz/testing 2.42.2-3 amd64 [upgradable from: 2.40.1-7]
hexchat/testing 2.14.2-5+b1 amd64 [upgradable from: 2.14.2-5]
imagemagick-6.q16/testing 8:6.9.10.23+dfsg-2.1+b2 amd64 [upgradable from: 8:6.9.10.23+dfsg-2.1+b1]
imagemagick/testing 8:6.9.10.23+dfsg-2.1+b2 amd64 [upgradable from: 8:6.9.10.23+dfsg-2.1+b1]
iputils-ping/testing 3:20190709-2 amd64 [upgradable from: 3:20190709-1]
libalgorithm-diff-xs-perl/testing 0.04-5+b2 amd64 [upgradable from: 0.04-5+b1]
libapparmor1/testing 2.13.3-5+b1 amd64 [upgradable from: 2.13.3-5]
libapt-pkg-perl/testing 0.1.36+b2 amd64 [upgradable from: 0.1.36+b1]
libatk-adaptor/testing 2.34.1-1 amd64 [upgradable from: 2.34.0-3]
libatk-bridge2.0-0/testing 2.34.1-1 amd64 [upgradable from: 2.34.0-3]
libatk-bridge2.0-dev/testing 2.34.1-1 amd64 [upgradable from: 2.34.0-3]
libatk1.0-0/testing 2.34.1-1 amd64 [upgradable from: 2.34.0-1]
libatk1.0-data/testing 2.34.1-1 all [upgradable from: 2.34.0-1]
libatk1.0-dev/testing 2.34.1-1 amd64 [upgradable from: 2.34.0-1]
libatk1.0-doc/testing 2.34.1-1 all [upgradable from: 2.34.0-1]
libb-hooks-op-check-perl/testing 0.22-1+b2 amd64 [upgradable from: 0.22-1+b1]
libcairo-gobject-perl/testing 1.005-2+b1 amd64 [upgradable from: 1.005-2]
libcairo-perl/testing 1.106-3+b2 amd64 [upgradable from: 1.106-3+b1]
libcdt5/testing 2.42.2-3 amd64 [upgradable from: 2.40.1-7]
libcgraph6/testing 2.42.2-3 amd64 [upgradable from: 2.40.1-7]
libclass-xsaccessor-perl/testing 1.19-3+b3 amd64 [upgradable from: 1.19-3+b2]
libclone-perl/testing 0.41-1+b2 amd64 [upgradable from: 0.41-1+b1]
libcommon-sense-perl/testing 3.74-2+b8 amd64 [upgradable from: 3.74-2+b7]
libdbd-mysql-perl/testing 4.050-2+b1 amd64 [upgradable from: 4.050-2]
libdbi-perl/testing 1.642-1+b2 amd64 [upgradable from: 1.642-1+b1]
libdevel-callchecker-perl/testing 0.008-1+b1 amd64 [upgradable from: 0.008-1]
libfcgi-perl/testing 0.78-2+b4 amd64 [upgradable from: 0.78-2+b3]
libfile-fcntllock-perl/testing 0.22-3+b6 amd64 [upgradable from: 0.22-3+b5]
libgd-perl/testing 2.71-2+b1 amd64 [upgradable from: 2.71-2]
libgdal-dev/testing 2.4.2+dfsg-1+b3 amd64 [upgradable from: 2.4.2+dfsg-1+b2]
libgdal20/testing 2.4.2+dfsg-1+b3 amd64 [upgradable from: 2.4.2+dfsg-1+b2]
libgjs0g/testing 1.58.1-1 amd64 [upgradable from: 1.58.0-2]
libglib-object-introspection-perl/testing 0.047-1+b1 amd64 [upgradable from: 0.047-1]
libglib-perl/testing 3:1.329.1-1+b1 amd64 [upgradable from: 3:1.329.1-1]
libglib2.0-0/testing 2.62.1-1 amd64 [upgradable from: 2.62.0-3]
libglib2.0-bin/testing 2.62.1-1 amd64 [upgradable from: 2.62.0-3]
libglib2.0-data/testing 2.62.1-1 all [upgradable from: 2.62.0-3]
libglib2.0-dev-bin/testing 2.62.1-1 amd64 [upgradable from: 2.62.0-3]
libglib2.0-dev/testing 2.62.1-1 amd64 [upgradable from: 2.62.0-3]
libglib2.0-doc/testing 2.62.1-1 all [upgradable from: 2.62.0-3]
libgvc6/testing 2.42.2-3 amd64 [upgradable from: 2.40.1-7]
libgvpr2/testing 2.42.2-3 amd64 [upgradable from: 2.40.1-7]
libhtml-parser-perl/testing 3.72-3+b4 amd64 [upgradable from: 3.72-3+b3]
libimage-magick-q16-perl/testing 8:6.9.10.23+dfsg-2.1+b2 amd64 [upgradable from: 8:6.9.10.23+dfsg-2.1+b1]
libio-pty-perl/testing 1:1.08-1.1+b6 amd64 [upgradable from: 1:1.08-1.1+b5]
libjson-xs-perl/testing 4.020-1+b1 amd64 [upgradable from: 4.020-1]
liblab-gamut1/testing 2.42.2-3 amd64 [upgradable from: 2.40.1-7]
libldap-2.4-2/testing 2.4.48+dfsg-1+b1 amd64 [upgradable from: 2.4.48+dfsg-1]
liblinux-epoll-perl/testing 0.016-1+b2 amd64 [upgradable from: 0.016-1+b1]
liblist-moreutils-perl/testing 0.416-1+b5 amd64 [upgradable from: 0.416-1+b4]
liblocale-gettext-perl/testing 1.07-3+b5 amd64 [upgradable from: 1.07-3+b4]
liblz4-1/testing 1.9.1-2 amd64 [upgradable from: 1.8.3-1+b1]
libmagick++-6.q16-8/testing 8:6.9.10.23+dfsg-2.1+b2 amd64 [upgradable from: 8:6.9.10.23+dfsg-2.1+b1]
libmagickcore-6.q16-6/testing 8:6.9.10.23+dfsg-2.1+b2 amd64 [upgradable from: 8:6.9.10.23+dfsg-2.1+b1]
libmagickwand-6.q16-6/testing 8:6.9.10.23+dfsg-2.1+b2 amd64 [upgradable from: 8:6.9.10.23+dfsg-2.1+b1]
libnet-dbus-perl/testing 1.1.0-6+b1 amd64 [upgradable from: 1.1.0-6]
libnet-dns-sec-perl/testing 1.13-1+b1 amd64 [upgradable from: 1.13-1]
libnet-libidn-perl/testing 0.12.ds-3+b2 amd64 [upgradable from: 0.12.ds-3+b1]
libnet-ssleay-perl/testing 1.88-1+b1 amd64 [upgradable from: 1.88-1]
libpango-perl/testing 1.227-3+b2 amd64 [upgradable from: 1.227-3+b1]
libparams-classify-perl/testing 0.015-1+b2 amd64 [upgradable from: 0.015-1+b1]
libpathplan4/testing 2.42.2-3 amd64 [upgradable from: 2.40.1-7]
libperlio-gzip-perl/testing 0.19-1+b6 amd64 [upgradable from: 0.19-1+b5]
libpurple0/testing 2.13.0-2.2+b1 amd64 [upgradable from: 2.13.0-2.2]
libpython2.7-dev/testing 2.7.17~rc1-1 amd64 [upgradable from: 2.7.16-4]
libpython2.7-minimal/testing 2.7.17~rc1-1 amd64 [upgradable from: 2.7.16-4]
libpython2.7-stdlib/testing 2.7.17~rc1-1 amd64 [upgradable from: 2.7.16-4]
libpython2.7/testing 2.7.17~rc1-1 amd64 [upgradable from: 2.7.16-4]
libpython3.7-dev/testing 3.7.5~rc1-2 amd64 [upgradable from: 3.7.5~rc1-1]
libpython3.7-minimal/testing 3.7.5~rc1-2 amd64 [upgradable from: 3.7.5~rc1-1]
libpython3.7-stdlib/testing 3.7.5~rc1-2 amd64 [upgradable from: 3.7.5~rc1-1]
libpython3.7/testing 3.7.5~rc1-2 amd64 [upgradable from: 3.7.5~rc1-1]
libref-util-xs-perl/testing 0.117-1+b2 amd64 [upgradable from: 0.117-1+b1]
libsereal-decoder-perl/testing 4.007+ds-1+b1 amd64 [upgradable from: 4.007+ds-1]
libsereal-encoder-perl/testing 4.007+ds-1+b1 amd64 [upgradable from: 4.007+ds-1]
libsnmp30/testing 5.7.3+dfsg-5+b2 amd64 [upgradable from: 5.7.3+dfsg-5+b1]
libsqlite3-0/testing 3.30.0-1 amd64 [upgradable from: 3.29.0-2]
libsqlite3-dev/testing 3.30.0-1 amd64 [upgradable from: 3.29.0-2]
libsub-name-perl/testing 0.21-1+b4 amd64 [upgradable from: 0.21-1+b3]
libsvn1/testing 1.10.6-1+b1 amd64 [upgradable from: 1.10.6-1]
libterm-readkey-perl/testing 2.38-1+b1 amd64 [upgradable from: 2.38-1]
libtext-charwidth-perl/testing 0.04-9+b1 amd64 [upgradable from: 0.04-9]
libtext-iconv-perl/testing 1.7-6+b2 amd64 [upgradable from: 1.7-6]
libtotem0/testing 3.34.1-2 amd64 [upgradable from: 3.34.0-1+b1]
libtype-tiny-xs-perl/testing 0.016-1+b1 amd64 [upgradable from: 0.016-1]
libunicode-utf8-perl/testing 0.62-1+b1 amd64 [upgradable from: 0.62-1]
libxdot4/testing 2.42.2-3 amd64 [upgradable from: 2.40.1-7]
libxml-libxml-perl/testing 2.0134+dfsg-1+b1 amd64 [upgradable from: 2.0134+dfsg-1]
libxml-parser-perl/testing 2.46-1+b1 amd64 [upgradable from: 2.46-1]
libyaml-libyaml-perl/testing 0.80+repack-2+b1 amd64 [upgradable from: 0.80+repack-2]
libzbar0/testing 0.23-1.1+b1 amd64 [upgradable from: 0.23-1.1]
linux-compiler-gcc-8-x86/testing 5.2.17-1+b1 amd64 [upgradable from: 5.2.17-1]
linux-headers-5.2.0-3-amd64/testing 5.2.17-1+b1 amd64 [upgradable from: 5.2.17-1]
linux-kbuild-5.2/testing 5.2.17-1+b1 amd64 [upgradable from: 5.2.17-1]
linux-libc-dev/testing 5.2.17-1+b1 amd64 [upgradable from: 5.2.17-1]
meson/testing 0.52.0-1 all [upgradable from: 0.51.2-1]
node-yargs-parser/testing 15.0.0-1 all [upgradable from: 14.0.0-2]
openjdk-11-jdk-headless/testing 11.0.5+9-1 amd64 [upgradable from: 11.0.5+6-2]
openjdk-11-jdk/testing 11.0.5+9-1 amd64 [upgradable from: 11.0.5+6-2]
openjdk-11-jre-headless/testing 11.0.5+9-1 amd64 [upgradable from: 11.0.5+6-2]
openjdk-11-jre/testing 11.0.5+9-1 amd64 [upgradable from: 11.0.5+6-2]
openssh-client/testing 1:8.1p1-1 amd64 [upgradable from: 1:8.0p1-7]
openssh-server/testing 1:8.1p1-1 amd64 [upgradable from: 1:8.0p1-7]
openssh-sftp-server/testing 1:8.1p1-1 amd64 [upgradable from: 1:8.0p1-7]
perl-base/testing 5.30.0-6 amd64 [upgradable from: 5.28.1-6]
perl/testing 5.30.0-6 amd64 [upgradable from: 5.28.1-6]
pidgin/testing 2.13.0-2.2+b1 amd64 [upgradable from: 2.13.0-2.2]
python2.7-dev/testing 2.7.17~rc1-1 amd64 [upgradable from: 2.7.16-4]
python2.7-minimal/testing 2.7.17~rc1-1 amd64 [upgradable from: 2.7.16-4]
python2.7/testing 2.7.17~rc1-1 amd64 [upgradable from: 2.7.16-4]
python3.7-dev/testing 3.7.5~rc1-2 amd64 [upgradable from: 3.7.5~rc1-1]
python3.7-minimal/testing 3.7.5~rc1-2 amd64 [upgradable from: 3.7.5~rc1-1]
python3.7/testing 3.7.5~rc1-2 amd64 [upgradable from: 3.7.5~rc1-1]
subversion/testing 1.10.6-1+b1 amd64 [upgradable from: 1.10.6-1]
texinfo/testing 6.6.0.dfsg.1-2+b1 amd64 [upgradable from: 6.6.0.dfsg.1-2]
totem-common/testing 3.34.1-2 all [upgradable from: 3.34.0-1]
totem-plugins/testing 3.34.1-2 amd64 [upgradable from: 3.34.0-1+b1]
totem/testing 3.34.1-2 amd64 [upgradable from: 3.34.0-1+b1]
usb.ids/testing 2019.10.05-1 all [upgradable from: 2019.07.27-1]


I would like to update/install all the python2 related things, first. So I would do this:



 sudo apt-get -s install $(sudo apt list --upgradeable | cut -d " " -f 1 | sed 's//[a-z]*$//' | awk '/python3/' | tr "n" " ")


Of course, at every pipe this could be broken into pieces, and possibly > to files.



I also note that apt claims to be unstable with scripts.



Of course, it seems apt-get will accept a 'vertical list' of packages too, e.g.



 sudo apt-get -s install $(sudo apt list --upgradeable | cut -d " " -f 1 | sed 's//[a-z]*$//' | awk '/python3/')


and of course use only one sudo. This is something I do often and so hopefully (most likely) there is a better way and/or could help someone else too.



PS I thought this How to select an incomplete range of packages with apt? and this How to select an incomplete range of packages with apt? questions were close, but is not quite what I was looking for.



I tried to get @Jasen answer to work - apt: Install all php packages whatsoever but it pulls from the pool of apt-cache search and not apt list --upgradeable, but even he doesn't seem to like it (though it is much more graceful than what I use).










share|improve this question

































    0

















    Running Debian I often come across a flood of packages that could be upgraded. I don't want to just apt upgrade without doing it carefully so I want to install 'non-serious' packages first (with their associated libs, etc. - in groups), before I look at the 'serious' ones.



    A hacky way of doing that is at the end of this question, but I'm sure there are better ways, as well as possibly this question bringing to light better ideas or concerns.



    QUESTION: How can I install subgroups of related packages all together, from apt list --upgradeable?



    If here is the output of the above command;



    apparmor/testing 2.13.3-5+b1 amd64 [upgradable from: 2.13.3-5]
    gir1.2-atk-1.0/testing 2.34.1-1 amd64 [upgradable from: 2.34.0-1]
    gir1.2-totem-1.0/testing 3.34.1-2 amd64 [upgradable from: 3.34.0-1+b1]
    gjs/testing 1.58.1-1 amd64 [upgradable from: 1.58.0-2]
    gnome-calculator/testing 3.34.1-1 amd64 [upgradable from: 3.34.0-1]
    graphviz/testing 2.42.2-3 amd64 [upgradable from: 2.40.1-7]
    hexchat/testing 2.14.2-5+b1 amd64 [upgradable from: 2.14.2-5]
    imagemagick-6.q16/testing 8:6.9.10.23+dfsg-2.1+b2 amd64 [upgradable from: 8:6.9.10.23+dfsg-2.1+b1]
    imagemagick/testing 8:6.9.10.23+dfsg-2.1+b2 amd64 [upgradable from: 8:6.9.10.23+dfsg-2.1+b1]
    iputils-ping/testing 3:20190709-2 amd64 [upgradable from: 3:20190709-1]
    libalgorithm-diff-xs-perl/testing 0.04-5+b2 amd64 [upgradable from: 0.04-5+b1]
    libapparmor1/testing 2.13.3-5+b1 amd64 [upgradable from: 2.13.3-5]
    libapt-pkg-perl/testing 0.1.36+b2 amd64 [upgradable from: 0.1.36+b1]
    libatk-adaptor/testing 2.34.1-1 amd64 [upgradable from: 2.34.0-3]
    libatk-bridge2.0-0/testing 2.34.1-1 amd64 [upgradable from: 2.34.0-3]
    libatk-bridge2.0-dev/testing 2.34.1-1 amd64 [upgradable from: 2.34.0-3]
    libatk1.0-0/testing 2.34.1-1 amd64 [upgradable from: 2.34.0-1]
    libatk1.0-data/testing 2.34.1-1 all [upgradable from: 2.34.0-1]
    libatk1.0-dev/testing 2.34.1-1 amd64 [upgradable from: 2.34.0-1]
    libatk1.0-doc/testing 2.34.1-1 all [upgradable from: 2.34.0-1]
    libb-hooks-op-check-perl/testing 0.22-1+b2 amd64 [upgradable from: 0.22-1+b1]
    libcairo-gobject-perl/testing 1.005-2+b1 amd64 [upgradable from: 1.005-2]
    libcairo-perl/testing 1.106-3+b2 amd64 [upgradable from: 1.106-3+b1]
    libcdt5/testing 2.42.2-3 amd64 [upgradable from: 2.40.1-7]
    libcgraph6/testing 2.42.2-3 amd64 [upgradable from: 2.40.1-7]
    libclass-xsaccessor-perl/testing 1.19-3+b3 amd64 [upgradable from: 1.19-3+b2]
    libclone-perl/testing 0.41-1+b2 amd64 [upgradable from: 0.41-1+b1]
    libcommon-sense-perl/testing 3.74-2+b8 amd64 [upgradable from: 3.74-2+b7]
    libdbd-mysql-perl/testing 4.050-2+b1 amd64 [upgradable from: 4.050-2]
    libdbi-perl/testing 1.642-1+b2 amd64 [upgradable from: 1.642-1+b1]
    libdevel-callchecker-perl/testing 0.008-1+b1 amd64 [upgradable from: 0.008-1]
    libfcgi-perl/testing 0.78-2+b4 amd64 [upgradable from: 0.78-2+b3]
    libfile-fcntllock-perl/testing 0.22-3+b6 amd64 [upgradable from: 0.22-3+b5]
    libgd-perl/testing 2.71-2+b1 amd64 [upgradable from: 2.71-2]
    libgdal-dev/testing 2.4.2+dfsg-1+b3 amd64 [upgradable from: 2.4.2+dfsg-1+b2]
    libgdal20/testing 2.4.2+dfsg-1+b3 amd64 [upgradable from: 2.4.2+dfsg-1+b2]
    libgjs0g/testing 1.58.1-1 amd64 [upgradable from: 1.58.0-2]
    libglib-object-introspection-perl/testing 0.047-1+b1 amd64 [upgradable from: 0.047-1]
    libglib-perl/testing 3:1.329.1-1+b1 amd64 [upgradable from: 3:1.329.1-1]
    libglib2.0-0/testing 2.62.1-1 amd64 [upgradable from: 2.62.0-3]
    libglib2.0-bin/testing 2.62.1-1 amd64 [upgradable from: 2.62.0-3]
    libglib2.0-data/testing 2.62.1-1 all [upgradable from: 2.62.0-3]
    libglib2.0-dev-bin/testing 2.62.1-1 amd64 [upgradable from: 2.62.0-3]
    libglib2.0-dev/testing 2.62.1-1 amd64 [upgradable from: 2.62.0-3]
    libglib2.0-doc/testing 2.62.1-1 all [upgradable from: 2.62.0-3]
    libgvc6/testing 2.42.2-3 amd64 [upgradable from: 2.40.1-7]
    libgvpr2/testing 2.42.2-3 amd64 [upgradable from: 2.40.1-7]
    libhtml-parser-perl/testing 3.72-3+b4 amd64 [upgradable from: 3.72-3+b3]
    libimage-magick-q16-perl/testing 8:6.9.10.23+dfsg-2.1+b2 amd64 [upgradable from: 8:6.9.10.23+dfsg-2.1+b1]
    libio-pty-perl/testing 1:1.08-1.1+b6 amd64 [upgradable from: 1:1.08-1.1+b5]
    libjson-xs-perl/testing 4.020-1+b1 amd64 [upgradable from: 4.020-1]
    liblab-gamut1/testing 2.42.2-3 amd64 [upgradable from: 2.40.1-7]
    libldap-2.4-2/testing 2.4.48+dfsg-1+b1 amd64 [upgradable from: 2.4.48+dfsg-1]
    liblinux-epoll-perl/testing 0.016-1+b2 amd64 [upgradable from: 0.016-1+b1]
    liblist-moreutils-perl/testing 0.416-1+b5 amd64 [upgradable from: 0.416-1+b4]
    liblocale-gettext-perl/testing 1.07-3+b5 amd64 [upgradable from: 1.07-3+b4]
    liblz4-1/testing 1.9.1-2 amd64 [upgradable from: 1.8.3-1+b1]
    libmagick++-6.q16-8/testing 8:6.9.10.23+dfsg-2.1+b2 amd64 [upgradable from: 8:6.9.10.23+dfsg-2.1+b1]
    libmagickcore-6.q16-6/testing 8:6.9.10.23+dfsg-2.1+b2 amd64 [upgradable from: 8:6.9.10.23+dfsg-2.1+b1]
    libmagickwand-6.q16-6/testing 8:6.9.10.23+dfsg-2.1+b2 amd64 [upgradable from: 8:6.9.10.23+dfsg-2.1+b1]
    libnet-dbus-perl/testing 1.1.0-6+b1 amd64 [upgradable from: 1.1.0-6]
    libnet-dns-sec-perl/testing 1.13-1+b1 amd64 [upgradable from: 1.13-1]
    libnet-libidn-perl/testing 0.12.ds-3+b2 amd64 [upgradable from: 0.12.ds-3+b1]
    libnet-ssleay-perl/testing 1.88-1+b1 amd64 [upgradable from: 1.88-1]
    libpango-perl/testing 1.227-3+b2 amd64 [upgradable from: 1.227-3+b1]
    libparams-classify-perl/testing 0.015-1+b2 amd64 [upgradable from: 0.015-1+b1]
    libpathplan4/testing 2.42.2-3 amd64 [upgradable from: 2.40.1-7]
    libperlio-gzip-perl/testing 0.19-1+b6 amd64 [upgradable from: 0.19-1+b5]
    libpurple0/testing 2.13.0-2.2+b1 amd64 [upgradable from: 2.13.0-2.2]
    libpython2.7-dev/testing 2.7.17~rc1-1 amd64 [upgradable from: 2.7.16-4]
    libpython2.7-minimal/testing 2.7.17~rc1-1 amd64 [upgradable from: 2.7.16-4]
    libpython2.7-stdlib/testing 2.7.17~rc1-1 amd64 [upgradable from: 2.7.16-4]
    libpython2.7/testing 2.7.17~rc1-1 amd64 [upgradable from: 2.7.16-4]
    libpython3.7-dev/testing 3.7.5~rc1-2 amd64 [upgradable from: 3.7.5~rc1-1]
    libpython3.7-minimal/testing 3.7.5~rc1-2 amd64 [upgradable from: 3.7.5~rc1-1]
    libpython3.7-stdlib/testing 3.7.5~rc1-2 amd64 [upgradable from: 3.7.5~rc1-1]
    libpython3.7/testing 3.7.5~rc1-2 amd64 [upgradable from: 3.7.5~rc1-1]
    libref-util-xs-perl/testing 0.117-1+b2 amd64 [upgradable from: 0.117-1+b1]
    libsereal-decoder-perl/testing 4.007+ds-1+b1 amd64 [upgradable from: 4.007+ds-1]
    libsereal-encoder-perl/testing 4.007+ds-1+b1 amd64 [upgradable from: 4.007+ds-1]
    libsnmp30/testing 5.7.3+dfsg-5+b2 amd64 [upgradable from: 5.7.3+dfsg-5+b1]
    libsqlite3-0/testing 3.30.0-1 amd64 [upgradable from: 3.29.0-2]
    libsqlite3-dev/testing 3.30.0-1 amd64 [upgradable from: 3.29.0-2]
    libsub-name-perl/testing 0.21-1+b4 amd64 [upgradable from: 0.21-1+b3]
    libsvn1/testing 1.10.6-1+b1 amd64 [upgradable from: 1.10.6-1]
    libterm-readkey-perl/testing 2.38-1+b1 amd64 [upgradable from: 2.38-1]
    libtext-charwidth-perl/testing 0.04-9+b1 amd64 [upgradable from: 0.04-9]
    libtext-iconv-perl/testing 1.7-6+b2 amd64 [upgradable from: 1.7-6]
    libtotem0/testing 3.34.1-2 amd64 [upgradable from: 3.34.0-1+b1]
    libtype-tiny-xs-perl/testing 0.016-1+b1 amd64 [upgradable from: 0.016-1]
    libunicode-utf8-perl/testing 0.62-1+b1 amd64 [upgradable from: 0.62-1]
    libxdot4/testing 2.42.2-3 amd64 [upgradable from: 2.40.1-7]
    libxml-libxml-perl/testing 2.0134+dfsg-1+b1 amd64 [upgradable from: 2.0134+dfsg-1]
    libxml-parser-perl/testing 2.46-1+b1 amd64 [upgradable from: 2.46-1]
    libyaml-libyaml-perl/testing 0.80+repack-2+b1 amd64 [upgradable from: 0.80+repack-2]
    libzbar0/testing 0.23-1.1+b1 amd64 [upgradable from: 0.23-1.1]
    linux-compiler-gcc-8-x86/testing 5.2.17-1+b1 amd64 [upgradable from: 5.2.17-1]
    linux-headers-5.2.0-3-amd64/testing 5.2.17-1+b1 amd64 [upgradable from: 5.2.17-1]
    linux-kbuild-5.2/testing 5.2.17-1+b1 amd64 [upgradable from: 5.2.17-1]
    linux-libc-dev/testing 5.2.17-1+b1 amd64 [upgradable from: 5.2.17-1]
    meson/testing 0.52.0-1 all [upgradable from: 0.51.2-1]
    node-yargs-parser/testing 15.0.0-1 all [upgradable from: 14.0.0-2]
    openjdk-11-jdk-headless/testing 11.0.5+9-1 amd64 [upgradable from: 11.0.5+6-2]
    openjdk-11-jdk/testing 11.0.5+9-1 amd64 [upgradable from: 11.0.5+6-2]
    openjdk-11-jre-headless/testing 11.0.5+9-1 amd64 [upgradable from: 11.0.5+6-2]
    openjdk-11-jre/testing 11.0.5+9-1 amd64 [upgradable from: 11.0.5+6-2]
    openssh-client/testing 1:8.1p1-1 amd64 [upgradable from: 1:8.0p1-7]
    openssh-server/testing 1:8.1p1-1 amd64 [upgradable from: 1:8.0p1-7]
    openssh-sftp-server/testing 1:8.1p1-1 amd64 [upgradable from: 1:8.0p1-7]
    perl-base/testing 5.30.0-6 amd64 [upgradable from: 5.28.1-6]
    perl/testing 5.30.0-6 amd64 [upgradable from: 5.28.1-6]
    pidgin/testing 2.13.0-2.2+b1 amd64 [upgradable from: 2.13.0-2.2]
    python2.7-dev/testing 2.7.17~rc1-1 amd64 [upgradable from: 2.7.16-4]
    python2.7-minimal/testing 2.7.17~rc1-1 amd64 [upgradable from: 2.7.16-4]
    python2.7/testing 2.7.17~rc1-1 amd64 [upgradable from: 2.7.16-4]
    python3.7-dev/testing 3.7.5~rc1-2 amd64 [upgradable from: 3.7.5~rc1-1]
    python3.7-minimal/testing 3.7.5~rc1-2 amd64 [upgradable from: 3.7.5~rc1-1]
    python3.7/testing 3.7.5~rc1-2 amd64 [upgradable from: 3.7.5~rc1-1]
    subversion/testing 1.10.6-1+b1 amd64 [upgradable from: 1.10.6-1]
    texinfo/testing 6.6.0.dfsg.1-2+b1 amd64 [upgradable from: 6.6.0.dfsg.1-2]
    totem-common/testing 3.34.1-2 all [upgradable from: 3.34.0-1]
    totem-plugins/testing 3.34.1-2 amd64 [upgradable from: 3.34.0-1+b1]
    totem/testing 3.34.1-2 amd64 [upgradable from: 3.34.0-1+b1]
    usb.ids/testing 2019.10.05-1 all [upgradable from: 2019.07.27-1]


    I would like to update/install all the python2 related things, first. So I would do this:



     sudo apt-get -s install $(sudo apt list --upgradeable | cut -d " " -f 1 | sed 's//[a-z]*$//' | awk '/python3/' | tr "n" " ")


    Of course, at every pipe this could be broken into pieces, and possibly > to files.



    I also note that apt claims to be unstable with scripts.



    Of course, it seems apt-get will accept a 'vertical list' of packages too, e.g.



     sudo apt-get -s install $(sudo apt list --upgradeable | cut -d " " -f 1 | sed 's//[a-z]*$//' | awk '/python3/')


    and of course use only one sudo. This is something I do often and so hopefully (most likely) there is a better way and/or could help someone else too.



    PS I thought this How to select an incomplete range of packages with apt? and this How to select an incomplete range of packages with apt? questions were close, but is not quite what I was looking for.



    I tried to get @Jasen answer to work - apt: Install all php packages whatsoever but it pulls from the pool of apt-cache search and not apt list --upgradeable, but even he doesn't seem to like it (though it is much more graceful than what I use).










    share|improve this question





























      0












      0








      0








      Running Debian I often come across a flood of packages that could be upgraded. I don't want to just apt upgrade without doing it carefully so I want to install 'non-serious' packages first (with their associated libs, etc. - in groups), before I look at the 'serious' ones.



      A hacky way of doing that is at the end of this question, but I'm sure there are better ways, as well as possibly this question bringing to light better ideas or concerns.



      QUESTION: How can I install subgroups of related packages all together, from apt list --upgradeable?



      If here is the output of the above command;



      apparmor/testing 2.13.3-5+b1 amd64 [upgradable from: 2.13.3-5]
      gir1.2-atk-1.0/testing 2.34.1-1 amd64 [upgradable from: 2.34.0-1]
      gir1.2-totem-1.0/testing 3.34.1-2 amd64 [upgradable from: 3.34.0-1+b1]
      gjs/testing 1.58.1-1 amd64 [upgradable from: 1.58.0-2]
      gnome-calculator/testing 3.34.1-1 amd64 [upgradable from: 3.34.0-1]
      graphviz/testing 2.42.2-3 amd64 [upgradable from: 2.40.1-7]
      hexchat/testing 2.14.2-5+b1 amd64 [upgradable from: 2.14.2-5]
      imagemagick-6.q16/testing 8:6.9.10.23+dfsg-2.1+b2 amd64 [upgradable from: 8:6.9.10.23+dfsg-2.1+b1]
      imagemagick/testing 8:6.9.10.23+dfsg-2.1+b2 amd64 [upgradable from: 8:6.9.10.23+dfsg-2.1+b1]
      iputils-ping/testing 3:20190709-2 amd64 [upgradable from: 3:20190709-1]
      libalgorithm-diff-xs-perl/testing 0.04-5+b2 amd64 [upgradable from: 0.04-5+b1]
      libapparmor1/testing 2.13.3-5+b1 amd64 [upgradable from: 2.13.3-5]
      libapt-pkg-perl/testing 0.1.36+b2 amd64 [upgradable from: 0.1.36+b1]
      libatk-adaptor/testing 2.34.1-1 amd64 [upgradable from: 2.34.0-3]
      libatk-bridge2.0-0/testing 2.34.1-1 amd64 [upgradable from: 2.34.0-3]
      libatk-bridge2.0-dev/testing 2.34.1-1 amd64 [upgradable from: 2.34.0-3]
      libatk1.0-0/testing 2.34.1-1 amd64 [upgradable from: 2.34.0-1]
      libatk1.0-data/testing 2.34.1-1 all [upgradable from: 2.34.0-1]
      libatk1.0-dev/testing 2.34.1-1 amd64 [upgradable from: 2.34.0-1]
      libatk1.0-doc/testing 2.34.1-1 all [upgradable from: 2.34.0-1]
      libb-hooks-op-check-perl/testing 0.22-1+b2 amd64 [upgradable from: 0.22-1+b1]
      libcairo-gobject-perl/testing 1.005-2+b1 amd64 [upgradable from: 1.005-2]
      libcairo-perl/testing 1.106-3+b2 amd64 [upgradable from: 1.106-3+b1]
      libcdt5/testing 2.42.2-3 amd64 [upgradable from: 2.40.1-7]
      libcgraph6/testing 2.42.2-3 amd64 [upgradable from: 2.40.1-7]
      libclass-xsaccessor-perl/testing 1.19-3+b3 amd64 [upgradable from: 1.19-3+b2]
      libclone-perl/testing 0.41-1+b2 amd64 [upgradable from: 0.41-1+b1]
      libcommon-sense-perl/testing 3.74-2+b8 amd64 [upgradable from: 3.74-2+b7]
      libdbd-mysql-perl/testing 4.050-2+b1 amd64 [upgradable from: 4.050-2]
      libdbi-perl/testing 1.642-1+b2 amd64 [upgradable from: 1.642-1+b1]
      libdevel-callchecker-perl/testing 0.008-1+b1 amd64 [upgradable from: 0.008-1]
      libfcgi-perl/testing 0.78-2+b4 amd64 [upgradable from: 0.78-2+b3]
      libfile-fcntllock-perl/testing 0.22-3+b6 amd64 [upgradable from: 0.22-3+b5]
      libgd-perl/testing 2.71-2+b1 amd64 [upgradable from: 2.71-2]
      libgdal-dev/testing 2.4.2+dfsg-1+b3 amd64 [upgradable from: 2.4.2+dfsg-1+b2]
      libgdal20/testing 2.4.2+dfsg-1+b3 amd64 [upgradable from: 2.4.2+dfsg-1+b2]
      libgjs0g/testing 1.58.1-1 amd64 [upgradable from: 1.58.0-2]
      libglib-object-introspection-perl/testing 0.047-1+b1 amd64 [upgradable from: 0.047-1]
      libglib-perl/testing 3:1.329.1-1+b1 amd64 [upgradable from: 3:1.329.1-1]
      libglib2.0-0/testing 2.62.1-1 amd64 [upgradable from: 2.62.0-3]
      libglib2.0-bin/testing 2.62.1-1 amd64 [upgradable from: 2.62.0-3]
      libglib2.0-data/testing 2.62.1-1 all [upgradable from: 2.62.0-3]
      libglib2.0-dev-bin/testing 2.62.1-1 amd64 [upgradable from: 2.62.0-3]
      libglib2.0-dev/testing 2.62.1-1 amd64 [upgradable from: 2.62.0-3]
      libglib2.0-doc/testing 2.62.1-1 all [upgradable from: 2.62.0-3]
      libgvc6/testing 2.42.2-3 amd64 [upgradable from: 2.40.1-7]
      libgvpr2/testing 2.42.2-3 amd64 [upgradable from: 2.40.1-7]
      libhtml-parser-perl/testing 3.72-3+b4 amd64 [upgradable from: 3.72-3+b3]
      libimage-magick-q16-perl/testing 8:6.9.10.23+dfsg-2.1+b2 amd64 [upgradable from: 8:6.9.10.23+dfsg-2.1+b1]
      libio-pty-perl/testing 1:1.08-1.1+b6 amd64 [upgradable from: 1:1.08-1.1+b5]
      libjson-xs-perl/testing 4.020-1+b1 amd64 [upgradable from: 4.020-1]
      liblab-gamut1/testing 2.42.2-3 amd64 [upgradable from: 2.40.1-7]
      libldap-2.4-2/testing 2.4.48+dfsg-1+b1 amd64 [upgradable from: 2.4.48+dfsg-1]
      liblinux-epoll-perl/testing 0.016-1+b2 amd64 [upgradable from: 0.016-1+b1]
      liblist-moreutils-perl/testing 0.416-1+b5 amd64 [upgradable from: 0.416-1+b4]
      liblocale-gettext-perl/testing 1.07-3+b5 amd64 [upgradable from: 1.07-3+b4]
      liblz4-1/testing 1.9.1-2 amd64 [upgradable from: 1.8.3-1+b1]
      libmagick++-6.q16-8/testing 8:6.9.10.23+dfsg-2.1+b2 amd64 [upgradable from: 8:6.9.10.23+dfsg-2.1+b1]
      libmagickcore-6.q16-6/testing 8:6.9.10.23+dfsg-2.1+b2 amd64 [upgradable from: 8:6.9.10.23+dfsg-2.1+b1]
      libmagickwand-6.q16-6/testing 8:6.9.10.23+dfsg-2.1+b2 amd64 [upgradable from: 8:6.9.10.23+dfsg-2.1+b1]
      libnet-dbus-perl/testing 1.1.0-6+b1 amd64 [upgradable from: 1.1.0-6]
      libnet-dns-sec-perl/testing 1.13-1+b1 amd64 [upgradable from: 1.13-1]
      libnet-libidn-perl/testing 0.12.ds-3+b2 amd64 [upgradable from: 0.12.ds-3+b1]
      libnet-ssleay-perl/testing 1.88-1+b1 amd64 [upgradable from: 1.88-1]
      libpango-perl/testing 1.227-3+b2 amd64 [upgradable from: 1.227-3+b1]
      libparams-classify-perl/testing 0.015-1+b2 amd64 [upgradable from: 0.015-1+b1]
      libpathplan4/testing 2.42.2-3 amd64 [upgradable from: 2.40.1-7]
      libperlio-gzip-perl/testing 0.19-1+b6 amd64 [upgradable from: 0.19-1+b5]
      libpurple0/testing 2.13.0-2.2+b1 amd64 [upgradable from: 2.13.0-2.2]
      libpython2.7-dev/testing 2.7.17~rc1-1 amd64 [upgradable from: 2.7.16-4]
      libpython2.7-minimal/testing 2.7.17~rc1-1 amd64 [upgradable from: 2.7.16-4]
      libpython2.7-stdlib/testing 2.7.17~rc1-1 amd64 [upgradable from: 2.7.16-4]
      libpython2.7/testing 2.7.17~rc1-1 amd64 [upgradable from: 2.7.16-4]
      libpython3.7-dev/testing 3.7.5~rc1-2 amd64 [upgradable from: 3.7.5~rc1-1]
      libpython3.7-minimal/testing 3.7.5~rc1-2 amd64 [upgradable from: 3.7.5~rc1-1]
      libpython3.7-stdlib/testing 3.7.5~rc1-2 amd64 [upgradable from: 3.7.5~rc1-1]
      libpython3.7/testing 3.7.5~rc1-2 amd64 [upgradable from: 3.7.5~rc1-1]
      libref-util-xs-perl/testing 0.117-1+b2 amd64 [upgradable from: 0.117-1+b1]
      libsereal-decoder-perl/testing 4.007+ds-1+b1 amd64 [upgradable from: 4.007+ds-1]
      libsereal-encoder-perl/testing 4.007+ds-1+b1 amd64 [upgradable from: 4.007+ds-1]
      libsnmp30/testing 5.7.3+dfsg-5+b2 amd64 [upgradable from: 5.7.3+dfsg-5+b1]
      libsqlite3-0/testing 3.30.0-1 amd64 [upgradable from: 3.29.0-2]
      libsqlite3-dev/testing 3.30.0-1 amd64 [upgradable from: 3.29.0-2]
      libsub-name-perl/testing 0.21-1+b4 amd64 [upgradable from: 0.21-1+b3]
      libsvn1/testing 1.10.6-1+b1 amd64 [upgradable from: 1.10.6-1]
      libterm-readkey-perl/testing 2.38-1+b1 amd64 [upgradable from: 2.38-1]
      libtext-charwidth-perl/testing 0.04-9+b1 amd64 [upgradable from: 0.04-9]
      libtext-iconv-perl/testing 1.7-6+b2 amd64 [upgradable from: 1.7-6]
      libtotem0/testing 3.34.1-2 amd64 [upgradable from: 3.34.0-1+b1]
      libtype-tiny-xs-perl/testing 0.016-1+b1 amd64 [upgradable from: 0.016-1]
      libunicode-utf8-perl/testing 0.62-1+b1 amd64 [upgradable from: 0.62-1]
      libxdot4/testing 2.42.2-3 amd64 [upgradable from: 2.40.1-7]
      libxml-libxml-perl/testing 2.0134+dfsg-1+b1 amd64 [upgradable from: 2.0134+dfsg-1]
      libxml-parser-perl/testing 2.46-1+b1 amd64 [upgradable from: 2.46-1]
      libyaml-libyaml-perl/testing 0.80+repack-2+b1 amd64 [upgradable from: 0.80+repack-2]
      libzbar0/testing 0.23-1.1+b1 amd64 [upgradable from: 0.23-1.1]
      linux-compiler-gcc-8-x86/testing 5.2.17-1+b1 amd64 [upgradable from: 5.2.17-1]
      linux-headers-5.2.0-3-amd64/testing 5.2.17-1+b1 amd64 [upgradable from: 5.2.17-1]
      linux-kbuild-5.2/testing 5.2.17-1+b1 amd64 [upgradable from: 5.2.17-1]
      linux-libc-dev/testing 5.2.17-1+b1 amd64 [upgradable from: 5.2.17-1]
      meson/testing 0.52.0-1 all [upgradable from: 0.51.2-1]
      node-yargs-parser/testing 15.0.0-1 all [upgradable from: 14.0.0-2]
      openjdk-11-jdk-headless/testing 11.0.5+9-1 amd64 [upgradable from: 11.0.5+6-2]
      openjdk-11-jdk/testing 11.0.5+9-1 amd64 [upgradable from: 11.0.5+6-2]
      openjdk-11-jre-headless/testing 11.0.5+9-1 amd64 [upgradable from: 11.0.5+6-2]
      openjdk-11-jre/testing 11.0.5+9-1 amd64 [upgradable from: 11.0.5+6-2]
      openssh-client/testing 1:8.1p1-1 amd64 [upgradable from: 1:8.0p1-7]
      openssh-server/testing 1:8.1p1-1 amd64 [upgradable from: 1:8.0p1-7]
      openssh-sftp-server/testing 1:8.1p1-1 amd64 [upgradable from: 1:8.0p1-7]
      perl-base/testing 5.30.0-6 amd64 [upgradable from: 5.28.1-6]
      perl/testing 5.30.0-6 amd64 [upgradable from: 5.28.1-6]
      pidgin/testing 2.13.0-2.2+b1 amd64 [upgradable from: 2.13.0-2.2]
      python2.7-dev/testing 2.7.17~rc1-1 amd64 [upgradable from: 2.7.16-4]
      python2.7-minimal/testing 2.7.17~rc1-1 amd64 [upgradable from: 2.7.16-4]
      python2.7/testing 2.7.17~rc1-1 amd64 [upgradable from: 2.7.16-4]
      python3.7-dev/testing 3.7.5~rc1-2 amd64 [upgradable from: 3.7.5~rc1-1]
      python3.7-minimal/testing 3.7.5~rc1-2 amd64 [upgradable from: 3.7.5~rc1-1]
      python3.7/testing 3.7.5~rc1-2 amd64 [upgradable from: 3.7.5~rc1-1]
      subversion/testing 1.10.6-1+b1 amd64 [upgradable from: 1.10.6-1]
      texinfo/testing 6.6.0.dfsg.1-2+b1 amd64 [upgradable from: 6.6.0.dfsg.1-2]
      totem-common/testing 3.34.1-2 all [upgradable from: 3.34.0-1]
      totem-plugins/testing 3.34.1-2 amd64 [upgradable from: 3.34.0-1+b1]
      totem/testing 3.34.1-2 amd64 [upgradable from: 3.34.0-1+b1]
      usb.ids/testing 2019.10.05-1 all [upgradable from: 2019.07.27-1]


      I would like to update/install all the python2 related things, first. So I would do this:



       sudo apt-get -s install $(sudo apt list --upgradeable | cut -d " " -f 1 | sed 's//[a-z]*$//' | awk '/python3/' | tr "n" " ")


      Of course, at every pipe this could be broken into pieces, and possibly > to files.



      I also note that apt claims to be unstable with scripts.



      Of course, it seems apt-get will accept a 'vertical list' of packages too, e.g.



       sudo apt-get -s install $(sudo apt list --upgradeable | cut -d " " -f 1 | sed 's//[a-z]*$//' | awk '/python3/')


      and of course use only one sudo. This is something I do often and so hopefully (most likely) there is a better way and/or could help someone else too.



      PS I thought this How to select an incomplete range of packages with apt? and this How to select an incomplete range of packages with apt? questions were close, but is not quite what I was looking for.



      I tried to get @Jasen answer to work - apt: Install all php packages whatsoever but it pulls from the pool of apt-cache search and not apt list --upgradeable, but even he doesn't seem to like it (though it is much more graceful than what I use).










      share|improve this question















      Running Debian I often come across a flood of packages that could be upgraded. I don't want to just apt upgrade without doing it carefully so I want to install 'non-serious' packages first (with their associated libs, etc. - in groups), before I look at the 'serious' ones.



      A hacky way of doing that is at the end of this question, but I'm sure there are better ways, as well as possibly this question bringing to light better ideas or concerns.



      QUESTION: How can I install subgroups of related packages all together, from apt list --upgradeable?



      If here is the output of the above command;



      apparmor/testing 2.13.3-5+b1 amd64 [upgradable from: 2.13.3-5]
      gir1.2-atk-1.0/testing 2.34.1-1 amd64 [upgradable from: 2.34.0-1]
      gir1.2-totem-1.0/testing 3.34.1-2 amd64 [upgradable from: 3.34.0-1+b1]
      gjs/testing 1.58.1-1 amd64 [upgradable from: 1.58.0-2]
      gnome-calculator/testing 3.34.1-1 amd64 [upgradable from: 3.34.0-1]
      graphviz/testing 2.42.2-3 amd64 [upgradable from: 2.40.1-7]
      hexchat/testing 2.14.2-5+b1 amd64 [upgradable from: 2.14.2-5]
      imagemagick-6.q16/testing 8:6.9.10.23+dfsg-2.1+b2 amd64 [upgradable from: 8:6.9.10.23+dfsg-2.1+b1]
      imagemagick/testing 8:6.9.10.23+dfsg-2.1+b2 amd64 [upgradable from: 8:6.9.10.23+dfsg-2.1+b1]
      iputils-ping/testing 3:20190709-2 amd64 [upgradable from: 3:20190709-1]
      libalgorithm-diff-xs-perl/testing 0.04-5+b2 amd64 [upgradable from: 0.04-5+b1]
      libapparmor1/testing 2.13.3-5+b1 amd64 [upgradable from: 2.13.3-5]
      libapt-pkg-perl/testing 0.1.36+b2 amd64 [upgradable from: 0.1.36+b1]
      libatk-adaptor/testing 2.34.1-1 amd64 [upgradable from: 2.34.0-3]
      libatk-bridge2.0-0/testing 2.34.1-1 amd64 [upgradable from: 2.34.0-3]
      libatk-bridge2.0-dev/testing 2.34.1-1 amd64 [upgradable from: 2.34.0-3]
      libatk1.0-0/testing 2.34.1-1 amd64 [upgradable from: 2.34.0-1]
      libatk1.0-data/testing 2.34.1-1 all [upgradable from: 2.34.0-1]
      libatk1.0-dev/testing 2.34.1-1 amd64 [upgradable from: 2.34.0-1]
      libatk1.0-doc/testing 2.34.1-1 all [upgradable from: 2.34.0-1]
      libb-hooks-op-check-perl/testing 0.22-1+b2 amd64 [upgradable from: 0.22-1+b1]
      libcairo-gobject-perl/testing 1.005-2+b1 amd64 [upgradable from: 1.005-2]
      libcairo-perl/testing 1.106-3+b2 amd64 [upgradable from: 1.106-3+b1]
      libcdt5/testing 2.42.2-3 amd64 [upgradable from: 2.40.1-7]
      libcgraph6/testing 2.42.2-3 amd64 [upgradable from: 2.40.1-7]
      libclass-xsaccessor-perl/testing 1.19-3+b3 amd64 [upgradable from: 1.19-3+b2]
      libclone-perl/testing 0.41-1+b2 amd64 [upgradable from: 0.41-1+b1]
      libcommon-sense-perl/testing 3.74-2+b8 amd64 [upgradable from: 3.74-2+b7]
      libdbd-mysql-perl/testing 4.050-2+b1 amd64 [upgradable from: 4.050-2]
      libdbi-perl/testing 1.642-1+b2 amd64 [upgradable from: 1.642-1+b1]
      libdevel-callchecker-perl/testing 0.008-1+b1 amd64 [upgradable from: 0.008-1]
      libfcgi-perl/testing 0.78-2+b4 amd64 [upgradable from: 0.78-2+b3]
      libfile-fcntllock-perl/testing 0.22-3+b6 amd64 [upgradable from: 0.22-3+b5]
      libgd-perl/testing 2.71-2+b1 amd64 [upgradable from: 2.71-2]
      libgdal-dev/testing 2.4.2+dfsg-1+b3 amd64 [upgradable from: 2.4.2+dfsg-1+b2]
      libgdal20/testing 2.4.2+dfsg-1+b3 amd64 [upgradable from: 2.4.2+dfsg-1+b2]
      libgjs0g/testing 1.58.1-1 amd64 [upgradable from: 1.58.0-2]
      libglib-object-introspection-perl/testing 0.047-1+b1 amd64 [upgradable from: 0.047-1]
      libglib-perl/testing 3:1.329.1-1+b1 amd64 [upgradable from: 3:1.329.1-1]
      libglib2.0-0/testing 2.62.1-1 amd64 [upgradable from: 2.62.0-3]
      libglib2.0-bin/testing 2.62.1-1 amd64 [upgradable from: 2.62.0-3]
      libglib2.0-data/testing 2.62.1-1 all [upgradable from: 2.62.0-3]
      libglib2.0-dev-bin/testing 2.62.1-1 amd64 [upgradable from: 2.62.0-3]
      libglib2.0-dev/testing 2.62.1-1 amd64 [upgradable from: 2.62.0-3]
      libglib2.0-doc/testing 2.62.1-1 all [upgradable from: 2.62.0-3]
      libgvc6/testing 2.42.2-3 amd64 [upgradable from: 2.40.1-7]
      libgvpr2/testing 2.42.2-3 amd64 [upgradable from: 2.40.1-7]
      libhtml-parser-perl/testing 3.72-3+b4 amd64 [upgradable from: 3.72-3+b3]
      libimage-magick-q16-perl/testing 8:6.9.10.23+dfsg-2.1+b2 amd64 [upgradable from: 8:6.9.10.23+dfsg-2.1+b1]
      libio-pty-perl/testing 1:1.08-1.1+b6 amd64 [upgradable from: 1:1.08-1.1+b5]
      libjson-xs-perl/testing 4.020-1+b1 amd64 [upgradable from: 4.020-1]
      liblab-gamut1/testing 2.42.2-3 amd64 [upgradable from: 2.40.1-7]
      libldap-2.4-2/testing 2.4.48+dfsg-1+b1 amd64 [upgradable from: 2.4.48+dfsg-1]
      liblinux-epoll-perl/testing 0.016-1+b2 amd64 [upgradable from: 0.016-1+b1]
      liblist-moreutils-perl/testing 0.416-1+b5 amd64 [upgradable from: 0.416-1+b4]
      liblocale-gettext-perl/testing 1.07-3+b5 amd64 [upgradable from: 1.07-3+b4]
      liblz4-1/testing 1.9.1-2 amd64 [upgradable from: 1.8.3-1+b1]
      libmagick++-6.q16-8/testing 8:6.9.10.23+dfsg-2.1+b2 amd64 [upgradable from: 8:6.9.10.23+dfsg-2.1+b1]
      libmagickcore-6.q16-6/testing 8:6.9.10.23+dfsg-2.1+b2 amd64 [upgradable from: 8:6.9.10.23+dfsg-2.1+b1]
      libmagickwand-6.q16-6/testing 8:6.9.10.23+dfsg-2.1+b2 amd64 [upgradable from: 8:6.9.10.23+dfsg-2.1+b1]
      libnet-dbus-perl/testing 1.1.0-6+b1 amd64 [upgradable from: 1.1.0-6]
      libnet-dns-sec-perl/testing 1.13-1+b1 amd64 [upgradable from: 1.13-1]
      libnet-libidn-perl/testing 0.12.ds-3+b2 amd64 [upgradable from: 0.12.ds-3+b1]
      libnet-ssleay-perl/testing 1.88-1+b1 amd64 [upgradable from: 1.88-1]
      libpango-perl/testing 1.227-3+b2 amd64 [upgradable from: 1.227-3+b1]
      libparams-classify-perl/testing 0.015-1+b2 amd64 [upgradable from: 0.015-1+b1]
      libpathplan4/testing 2.42.2-3 amd64 [upgradable from: 2.40.1-7]
      libperlio-gzip-perl/testing 0.19-1+b6 amd64 [upgradable from: 0.19-1+b5]
      libpurple0/testing 2.13.0-2.2+b1 amd64 [upgradable from: 2.13.0-2.2]
      libpython2.7-dev/testing 2.7.17~rc1-1 amd64 [upgradable from: 2.7.16-4]
      libpython2.7-minimal/testing 2.7.17~rc1-1 amd64 [upgradable from: 2.7.16-4]
      libpython2.7-stdlib/testing 2.7.17~rc1-1 amd64 [upgradable from: 2.7.16-4]
      libpython2.7/testing 2.7.17~rc1-1 amd64 [upgradable from: 2.7.16-4]
      libpython3.7-dev/testing 3.7.5~rc1-2 amd64 [upgradable from: 3.7.5~rc1-1]
      libpython3.7-minimal/testing 3.7.5~rc1-2 amd64 [upgradable from: 3.7.5~rc1-1]
      libpython3.7-stdlib/testing 3.7.5~rc1-2 amd64 [upgradable from: 3.7.5~rc1-1]
      libpython3.7/testing 3.7.5~rc1-2 amd64 [upgradable from: 3.7.5~rc1-1]
      libref-util-xs-perl/testing 0.117-1+b2 amd64 [upgradable from: 0.117-1+b1]
      libsereal-decoder-perl/testing 4.007+ds-1+b1 amd64 [upgradable from: 4.007+ds-1]
      libsereal-encoder-perl/testing 4.007+ds-1+b1 amd64 [upgradable from: 4.007+ds-1]
      libsnmp30/testing 5.7.3+dfsg-5+b2 amd64 [upgradable from: 5.7.3+dfsg-5+b1]
      libsqlite3-0/testing 3.30.0-1 amd64 [upgradable from: 3.29.0-2]
      libsqlite3-dev/testing 3.30.0-1 amd64 [upgradable from: 3.29.0-2]
      libsub-name-perl/testing 0.21-1+b4 amd64 [upgradable from: 0.21-1+b3]
      libsvn1/testing 1.10.6-1+b1 amd64 [upgradable from: 1.10.6-1]
      libterm-readkey-perl/testing 2.38-1+b1 amd64 [upgradable from: 2.38-1]
      libtext-charwidth-perl/testing 0.04-9+b1 amd64 [upgradable from: 0.04-9]
      libtext-iconv-perl/testing 1.7-6+b2 amd64 [upgradable from: 1.7-6]
      libtotem0/testing 3.34.1-2 amd64 [upgradable from: 3.34.0-1+b1]
      libtype-tiny-xs-perl/testing 0.016-1+b1 amd64 [upgradable from: 0.016-1]
      libunicode-utf8-perl/testing 0.62-1+b1 amd64 [upgradable from: 0.62-1]
      libxdot4/testing 2.42.2-3 amd64 [upgradable from: 2.40.1-7]
      libxml-libxml-perl/testing 2.0134+dfsg-1+b1 amd64 [upgradable from: 2.0134+dfsg-1]
      libxml-parser-perl/testing 2.46-1+b1 amd64 [upgradable from: 2.46-1]
      libyaml-libyaml-perl/testing 0.80+repack-2+b1 amd64 [upgradable from: 0.80+repack-2]
      libzbar0/testing 0.23-1.1+b1 amd64 [upgradable from: 0.23-1.1]
      linux-compiler-gcc-8-x86/testing 5.2.17-1+b1 amd64 [upgradable from: 5.2.17-1]
      linux-headers-5.2.0-3-amd64/testing 5.2.17-1+b1 amd64 [upgradable from: 5.2.17-1]
      linux-kbuild-5.2/testing 5.2.17-1+b1 amd64 [upgradable from: 5.2.17-1]
      linux-libc-dev/testing 5.2.17-1+b1 amd64 [upgradable from: 5.2.17-1]
      meson/testing 0.52.0-1 all [upgradable from: 0.51.2-1]
      node-yargs-parser/testing 15.0.0-1 all [upgradable from: 14.0.0-2]
      openjdk-11-jdk-headless/testing 11.0.5+9-1 amd64 [upgradable from: 11.0.5+6-2]
      openjdk-11-jdk/testing 11.0.5+9-1 amd64 [upgradable from: 11.0.5+6-2]
      openjdk-11-jre-headless/testing 11.0.5+9-1 amd64 [upgradable from: 11.0.5+6-2]
      openjdk-11-jre/testing 11.0.5+9-1 amd64 [upgradable from: 11.0.5+6-2]
      openssh-client/testing 1:8.1p1-1 amd64 [upgradable from: 1:8.0p1-7]
      openssh-server/testing 1:8.1p1-1 amd64 [upgradable from: 1:8.0p1-7]
      openssh-sftp-server/testing 1:8.1p1-1 amd64 [upgradable from: 1:8.0p1-7]
      perl-base/testing 5.30.0-6 amd64 [upgradable from: 5.28.1-6]
      perl/testing 5.30.0-6 amd64 [upgradable from: 5.28.1-6]
      pidgin/testing 2.13.0-2.2+b1 amd64 [upgradable from: 2.13.0-2.2]
      python2.7-dev/testing 2.7.17~rc1-1 amd64 [upgradable from: 2.7.16-4]
      python2.7-minimal/testing 2.7.17~rc1-1 amd64 [upgradable from: 2.7.16-4]
      python2.7/testing 2.7.17~rc1-1 amd64 [upgradable from: 2.7.16-4]
      python3.7-dev/testing 3.7.5~rc1-2 amd64 [upgradable from: 3.7.5~rc1-1]
      python3.7-minimal/testing 3.7.5~rc1-2 amd64 [upgradable from: 3.7.5~rc1-1]
      python3.7/testing 3.7.5~rc1-2 amd64 [upgradable from: 3.7.5~rc1-1]
      subversion/testing 1.10.6-1+b1 amd64 [upgradable from: 1.10.6-1]
      texinfo/testing 6.6.0.dfsg.1-2+b1 amd64 [upgradable from: 6.6.0.dfsg.1-2]
      totem-common/testing 3.34.1-2 all [upgradable from: 3.34.0-1]
      totem-plugins/testing 3.34.1-2 amd64 [upgradable from: 3.34.0-1+b1]
      totem/testing 3.34.1-2 amd64 [upgradable from: 3.34.0-1+b1]
      usb.ids/testing 2019.10.05-1 all [upgradable from: 2019.07.27-1]


      I would like to update/install all the python2 related things, first. So I would do this:



       sudo apt-get -s install $(sudo apt list --upgradeable | cut -d " " -f 1 | sed 's//[a-z]*$//' | awk '/python3/' | tr "n" " ")


      Of course, at every pipe this could be broken into pieces, and possibly > to files.



      I also note that apt claims to be unstable with scripts.



      Of course, it seems apt-get will accept a 'vertical list' of packages too, e.g.



       sudo apt-get -s install $(sudo apt list --upgradeable | cut -d " " -f 1 | sed 's//[a-z]*$//' | awk '/python3/')


      and of course use only one sudo. This is something I do often and so hopefully (most likely) there is a better way and/or could help someone else too.



      PS I thought this How to select an incomplete range of packages with apt? and this How to select an incomplete range of packages with apt? questions were close, but is not quite what I was looking for.



      I tried to get @Jasen answer to work - apt: Install all php packages whatsoever but it pulls from the pool of apt-cache search and not apt list --upgradeable, but even he doesn't seem to like it (though it is much more graceful than what I use).







      linux bash shell-script debian






      share|improve this question














      share|improve this question











      share|improve this question




      share|improve this question










      asked 1 hour ago









      natenate

      1719 bronze badges




      1719 bronze badges

























          0






          active

          oldest

          votes













          Your Answer








          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "106"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: false,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/4.0/"u003ecc by-sa 4.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });















          draft saved

          draft discarded
















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f546544%2fselect-related-packages-in-apt-upgradeable-to-install-selectively%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown


























          0






          active

          oldest

          votes








          0






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes

















          draft saved

          draft discarded



















































          Thanks for contributing an answer to Unix & Linux Stack Exchange!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f546544%2fselect-related-packages-in-apt-upgradeable-to-install-selectively%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown









          Popular posts from this blog

          Taj Mahal Inhaltsverzeichnis Aufbau | Geschichte | 350-Jahr-Feier | Heutige Bedeutung | Siehe auch |...

          Baia Sprie Cuprins Etimologie | Istorie | Demografie | Politică și administrație | Arii naturale...

          Nicolae Petrescu-Găină Cuprins Biografie | Opera | In memoriam | Varia | Controverse, incertitudini...