Recently when I was trying to update my Ubuntu, I initially used the commands:
sudo apt-get update && sudo apt-get upgrade
Then, I thought my system is full updated (i.e., with system and security updates), but gradually I found that Ubuntu was still prompting for certain updates, and those were actually the system updates. Proceeding, I read some discussions online, and started using,
sudo apt-get update && sudo apt-get full-upgrade
This also downloaded certain files like:
linux-headers-generic
linux-image-generic
etc.
Yesterday, someone suggested me to use:
sudo apt-get update && sudo apt upgrade
instead, since, it was mentioned that, apt-get full-upgrade
might cause error and is dangerous, for it can lead to deletion of necessary packages if the package system is "messed-up".
Now, I am a bit confused, and feels like to start over again.
Which command set should I use to get full system and security updates, and what is the actual difference between apt-get full-upgrade
and apt upgrade
. Is the former shouldn't be really put to use?
sudo apt-get update && sudo apt upgrade
contains two commands (the&&
means the second command is only executed if the first completes without errors) to you might need to clarify which two you mean. The link I selected mentionsupdate
,upgrade
anddist-upgrade
(orfull-upgrade
inapt
usage..) - refer toman
or manual pages for exact details on your release, as there is very slight variation on release (more functionality gets added toapt
over time, so there is less need forapt-get
very slowly) – guiverc Jul 07 '20 at 06:43apt-get full-upgrade
andapt upgrade
. – kamer_kane Jul 07 '20 at 06:45update
,upgrade
,dist-upgrade
&full-upgrade
. As stated there is slight variations asapt
gets improved over time (ie. release specific), so readman apt
for details for your unstated release. Personally I usefull-upgrade
(ordist-upgrade
) unless I have specific reason to limit upgrade to those provided byupgrade
– guiverc Jul 07 '20 at 06:46man apt
tells me "full-upgrade performs the function of upgrade but will remove currently installed packages if this is needed to upgrade the system as a whole" for my release.. the approximately similar detail found in my duplicate tagged post (variation will exist on release) – guiverc Jul 07 '20 at 06:48apt
is a nicer replacement forapt-get
. It however is a different tool, which does thing differently. The purpose of the commands isapt-get update
is replaced byapt update
,apt-get upgrade
is replaced byapt upgrade
,apt-get dist-upgrade
is replaced byapt-get full-upgrade
etc... the same options to ease transition, howeverapt-get
still does thingsapt
cannot do, whyapt
changes with releases...apt
is a wrapper that does almost the same asapt-get
so you're mixing two different tools in a way that isn't wise!!apt
will likely replaceapt-get
– guiverc Jul 07 '20 at 06:54sudo apt autoremove
can mean prior damage becomes readily apparent, though it didn't actually do the damage, it was prior careless commands). Problems if they occur were waiting to happen, and any mistakes were from prior commands in my opinion... – guiverc Jul 07 '20 at 07:00