Linux - display or upgrade security updates only using apt
Clash Royale CLAN TAG#URR8PPP
up vote
8
down vote
favorite
is there a way to list or install security upgrades only using apt?
if I list upgrades with:
apt list --upgradable
can I also see without knowing packages and libraries which upgrades are relevant security upgrades.
and furthermore is there an option to only apply those by skipping any others, so the non-security-relevant upgrades would be prompted again next time I run apt upgrade
?
debian security apt upgrade
add a comment |Â
up vote
8
down vote
favorite
is there a way to list or install security upgrades only using apt?
if I list upgrades with:
apt list --upgradable
can I also see without knowing packages and libraries which upgrades are relevant security upgrades.
and furthermore is there an option to only apply those by skipping any others, so the non-security-relevant upgrades would be prompted again next time I run apt upgrade
?
debian security apt upgrade
so you have two questions, 1.print security updates, 2.update only selected packages, well I know that there are 6 links in sources.list and two of them are security related repo links, you can see which upgradable packages would be downloaded from each link by following command: sudo apt upgrade --no-upgrade --assume-no --print-uris
â Brian SP2
Sep 26 '17 at 6:57
but about second question, apparently you can choose a single package to be upgraded by the following command sudo apt upgrade --upgrade-only <package name> but this doesn't work for me, sorry
â Brian SP2
Sep 26 '17 at 6:58
add a comment |Â
up vote
8
down vote
favorite
up vote
8
down vote
favorite
is there a way to list or install security upgrades only using apt?
if I list upgrades with:
apt list --upgradable
can I also see without knowing packages and libraries which upgrades are relevant security upgrades.
and furthermore is there an option to only apply those by skipping any others, so the non-security-relevant upgrades would be prompted again next time I run apt upgrade
?
debian security apt upgrade
is there a way to list or install security upgrades only using apt?
if I list upgrades with:
apt list --upgradable
can I also see without knowing packages and libraries which upgrades are relevant security upgrades.
and furthermore is there an option to only apply those by skipping any others, so the non-security-relevant upgrades would be prompted again next time I run apt upgrade
?
debian security apt upgrade
debian security apt upgrade
edited Oct 9 '17 at 13:32
Jeff Schaller
32.3k849110
32.3k849110
asked Sep 26 '17 at 0:22
nath
633421
633421
so you have two questions, 1.print security updates, 2.update only selected packages, well I know that there are 6 links in sources.list and two of them are security related repo links, you can see which upgradable packages would be downloaded from each link by following command: sudo apt upgrade --no-upgrade --assume-no --print-uris
â Brian SP2
Sep 26 '17 at 6:57
but about second question, apparently you can choose a single package to be upgraded by the following command sudo apt upgrade --upgrade-only <package name> but this doesn't work for me, sorry
â Brian SP2
Sep 26 '17 at 6:58
add a comment |Â
so you have two questions, 1.print security updates, 2.update only selected packages, well I know that there are 6 links in sources.list and two of them are security related repo links, you can see which upgradable packages would be downloaded from each link by following command: sudo apt upgrade --no-upgrade --assume-no --print-uris
â Brian SP2
Sep 26 '17 at 6:57
but about second question, apparently you can choose a single package to be upgraded by the following command sudo apt upgrade --upgrade-only <package name> but this doesn't work for me, sorry
â Brian SP2
Sep 26 '17 at 6:58
so you have two questions, 1.print security updates, 2.update only selected packages, well I know that there are 6 links in sources.list and two of them are security related repo links, you can see which upgradable packages would be downloaded from each link by following command: sudo apt upgrade --no-upgrade --assume-no --print-uris
â Brian SP2
Sep 26 '17 at 6:57
so you have two questions, 1.print security updates, 2.update only selected packages, well I know that there are 6 links in sources.list and two of them are security related repo links, you can see which upgradable packages would be downloaded from each link by following command: sudo apt upgrade --no-upgrade --assume-no --print-uris
â Brian SP2
Sep 26 '17 at 6:57
but about second question, apparently you can choose a single package to be upgraded by the following command sudo apt upgrade --upgrade-only <package name> but this doesn't work for me, sorry
â Brian SP2
Sep 26 '17 at 6:58
but about second question, apparently you can choose a single package to be upgraded by the following command sudo apt upgrade --upgrade-only <package name> but this doesn't work for me, sorry
â Brian SP2
Sep 26 '17 at 6:58
add a comment |Â
2 Answers
2
active
oldest
votes
up vote
7
down vote
accepted
apt
canâÂÂt (yet) provide the information youâÂÂre after. aptitude
can though, albeit somewhat confusingly:
aptitude search '~U ~ODebian' -F "%p %O"|awk '/Debian-Security/ print $1'
This searches all upgradable (~U
) packages from official Debian repositories (~ODebian
), and displays their package name (%p
) and âÂÂoriginâ (%O
). The latter actually displays the repository label, which is âÂÂDebian-Security:9/stableâ for the Debian 9 security repositories. You end up with a list of upgradable package names from the security repositories.
There are a variety of ways to install only security upgrades, none of them ideal though.
aptitude
âÂÂs text interface allows only security upgrades to be applied, simply by scrolling to the âÂÂSecurity Updatesâ header (which should be the first one) and hitting +.You can feed the list of packages extracted above to
apt
to install the upgrades:aptitude search '~U ~ODebian' -F "%p %O" |
awk '/Debian-Security/ print $1' |
xargs apt-get install --only-upgradeThis has the unfortunate side-effect of clearing the âÂÂautomatically installedâ marker on upgraded packages.
You can use
unattended-upgrades
, whose default action is to only apply security upgrades:unattended-upgrades -v
If you donâÂÂt want upgrades to be installed automatically, youâÂÂll need to disable
unattended-upgrades
âÂÂs daily cron job.
add a comment |Â
up vote
3
down vote
To display the security update you can use:
apt-get --just-print upgrade | grep -i security | awk 'print $2' | awk '!seen[$0]++'
To apply only the security updates for 1 package:
apt-get install --only-upgrade pckg_name
To apply only the security updates from list:
list=$(apt-get --just-print upgrade | grep -i security | awk 'print $2' | awk '!seen[$0]++')
apt-get install --only-upgrade $list
add a comment |Â
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
7
down vote
accepted
apt
canâÂÂt (yet) provide the information youâÂÂre after. aptitude
can though, albeit somewhat confusingly:
aptitude search '~U ~ODebian' -F "%p %O"|awk '/Debian-Security/ print $1'
This searches all upgradable (~U
) packages from official Debian repositories (~ODebian
), and displays their package name (%p
) and âÂÂoriginâ (%O
). The latter actually displays the repository label, which is âÂÂDebian-Security:9/stableâ for the Debian 9 security repositories. You end up with a list of upgradable package names from the security repositories.
There are a variety of ways to install only security upgrades, none of them ideal though.
aptitude
âÂÂs text interface allows only security upgrades to be applied, simply by scrolling to the âÂÂSecurity Updatesâ header (which should be the first one) and hitting +.You can feed the list of packages extracted above to
apt
to install the upgrades:aptitude search '~U ~ODebian' -F "%p %O" |
awk '/Debian-Security/ print $1' |
xargs apt-get install --only-upgradeThis has the unfortunate side-effect of clearing the âÂÂautomatically installedâ marker on upgraded packages.
You can use
unattended-upgrades
, whose default action is to only apply security upgrades:unattended-upgrades -v
If you donâÂÂt want upgrades to be installed automatically, youâÂÂll need to disable
unattended-upgrades
âÂÂs daily cron job.
add a comment |Â
up vote
7
down vote
accepted
apt
canâÂÂt (yet) provide the information youâÂÂre after. aptitude
can though, albeit somewhat confusingly:
aptitude search '~U ~ODebian' -F "%p %O"|awk '/Debian-Security/ print $1'
This searches all upgradable (~U
) packages from official Debian repositories (~ODebian
), and displays their package name (%p
) and âÂÂoriginâ (%O
). The latter actually displays the repository label, which is âÂÂDebian-Security:9/stableâ for the Debian 9 security repositories. You end up with a list of upgradable package names from the security repositories.
There are a variety of ways to install only security upgrades, none of them ideal though.
aptitude
âÂÂs text interface allows only security upgrades to be applied, simply by scrolling to the âÂÂSecurity Updatesâ header (which should be the first one) and hitting +.You can feed the list of packages extracted above to
apt
to install the upgrades:aptitude search '~U ~ODebian' -F "%p %O" |
awk '/Debian-Security/ print $1' |
xargs apt-get install --only-upgradeThis has the unfortunate side-effect of clearing the âÂÂautomatically installedâ marker on upgraded packages.
You can use
unattended-upgrades
, whose default action is to only apply security upgrades:unattended-upgrades -v
If you donâÂÂt want upgrades to be installed automatically, youâÂÂll need to disable
unattended-upgrades
âÂÂs daily cron job.
add a comment |Â
up vote
7
down vote
accepted
up vote
7
down vote
accepted
apt
canâÂÂt (yet) provide the information youâÂÂre after. aptitude
can though, albeit somewhat confusingly:
aptitude search '~U ~ODebian' -F "%p %O"|awk '/Debian-Security/ print $1'
This searches all upgradable (~U
) packages from official Debian repositories (~ODebian
), and displays their package name (%p
) and âÂÂoriginâ (%O
). The latter actually displays the repository label, which is âÂÂDebian-Security:9/stableâ for the Debian 9 security repositories. You end up with a list of upgradable package names from the security repositories.
There are a variety of ways to install only security upgrades, none of them ideal though.
aptitude
âÂÂs text interface allows only security upgrades to be applied, simply by scrolling to the âÂÂSecurity Updatesâ header (which should be the first one) and hitting +.You can feed the list of packages extracted above to
apt
to install the upgrades:aptitude search '~U ~ODebian' -F "%p %O" |
awk '/Debian-Security/ print $1' |
xargs apt-get install --only-upgradeThis has the unfortunate side-effect of clearing the âÂÂautomatically installedâ marker on upgraded packages.
You can use
unattended-upgrades
, whose default action is to only apply security upgrades:unattended-upgrades -v
If you donâÂÂt want upgrades to be installed automatically, youâÂÂll need to disable
unattended-upgrades
âÂÂs daily cron job.
apt
canâÂÂt (yet) provide the information youâÂÂre after. aptitude
can though, albeit somewhat confusingly:
aptitude search '~U ~ODebian' -F "%p %O"|awk '/Debian-Security/ print $1'
This searches all upgradable (~U
) packages from official Debian repositories (~ODebian
), and displays their package name (%p
) and âÂÂoriginâ (%O
). The latter actually displays the repository label, which is âÂÂDebian-Security:9/stableâ for the Debian 9 security repositories. You end up with a list of upgradable package names from the security repositories.
There are a variety of ways to install only security upgrades, none of them ideal though.
aptitude
âÂÂs text interface allows only security upgrades to be applied, simply by scrolling to the âÂÂSecurity Updatesâ header (which should be the first one) and hitting +.You can feed the list of packages extracted above to
apt
to install the upgrades:aptitude search '~U ~ODebian' -F "%p %O" |
awk '/Debian-Security/ print $1' |
xargs apt-get install --only-upgradeThis has the unfortunate side-effect of clearing the âÂÂautomatically installedâ marker on upgraded packages.
You can use
unattended-upgrades
, whose default action is to only apply security upgrades:unattended-upgrades -v
If you donâÂÂt want upgrades to be installed automatically, youâÂÂll need to disable
unattended-upgrades
âÂÂs daily cron job.
answered Sep 26 '17 at 7:47
Stephen Kitt
145k22317382
145k22317382
add a comment |Â
add a comment |Â
up vote
3
down vote
To display the security update you can use:
apt-get --just-print upgrade | grep -i security | awk 'print $2' | awk '!seen[$0]++'
To apply only the security updates for 1 package:
apt-get install --only-upgrade pckg_name
To apply only the security updates from list:
list=$(apt-get --just-print upgrade | grep -i security | awk 'print $2' | awk '!seen[$0]++')
apt-get install --only-upgrade $list
add a comment |Â
up vote
3
down vote
To display the security update you can use:
apt-get --just-print upgrade | grep -i security | awk 'print $2' | awk '!seen[$0]++'
To apply only the security updates for 1 package:
apt-get install --only-upgrade pckg_name
To apply only the security updates from list:
list=$(apt-get --just-print upgrade | grep -i security | awk 'print $2' | awk '!seen[$0]++')
apt-get install --only-upgrade $list
add a comment |Â
up vote
3
down vote
up vote
3
down vote
To display the security update you can use:
apt-get --just-print upgrade | grep -i security | awk 'print $2' | awk '!seen[$0]++'
To apply only the security updates for 1 package:
apt-get install --only-upgrade pckg_name
To apply only the security updates from list:
list=$(apt-get --just-print upgrade | grep -i security | awk 'print $2' | awk '!seen[$0]++')
apt-get install --only-upgrade $list
To display the security update you can use:
apt-get --just-print upgrade | grep -i security | awk 'print $2' | awk '!seen[$0]++'
To apply only the security updates for 1 package:
apt-get install --only-upgrade pckg_name
To apply only the security updates from list:
list=$(apt-get --just-print upgrade | grep -i security | awk 'print $2' | awk '!seen[$0]++')
apt-get install --only-upgrade $list
answered Sep 27 '17 at 9:37
GAD3R
22.7k154895
22.7k154895
add a comment |Â
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f394438%2flinux-display-or-upgrade-security-updates-only-using-apt%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
so you have two questions, 1.print security updates, 2.update only selected packages, well I know that there are 6 links in sources.list and two of them are security related repo links, you can see which upgradable packages would be downloaded from each link by following command: sudo apt upgrade --no-upgrade --assume-no --print-uris
â Brian SP2
Sep 26 '17 at 6:57
but about second question, apparently you can choose a single package to be upgraded by the following command sudo apt upgrade --upgrade-only <package name> but this doesn't work for me, sorry
â Brian SP2
Sep 26 '17 at 6:58