r/linuxquestions • • May 22 '26

Support Difference between apt update and apt-get update

Yesterday I had a computer science exam. One of the questions asked: "Which command installs the most recent versions of the programs installed on Linux?" None of the answer choices included anything related to upgrade all of them referred to update. My professor stated that the correct answer was apt-get update, and that the difference between apt update and apt-get update was that apt only searches for updates, whereas apt-get installs new versions of programs. The entire class disagreed, but he insisted. What is the actual difference between these commands, and is my professor mistaken?

311 Upvotes

199 comments sorted by

View all comments

Show parent comment

46

u/ovelx2 May 22 '26

I just brought it up right now, I said the question was wrong and I showed him the Ubuntu manual where it states that update doesn't download or install anything, and the teacher dodged the question by saying that update doesn't install, but rather "downloads" to avoid having to explain why the question was poorly worded. If you're curious, the exact question was:

Which Linux command installs new versions of installed programs?

A. apt update

B. apt-get update

C. apt update --all

D. Update-all"

137

u/MoobyTheGoldenSock May 22 '26 edited May 23 '26

The apt update and apt-get update commands don't download packages. That would be apt upgrade --download-only or apt-get upgrade --download-only. Apt(-get) update just synchronizes the package databases. The only thing it downloads is a list of packages, not the packages themselves.

Why is your professor teaching this class if he doesn't know what the hell he's talking about?

32

u/radiowave911 May 22 '26

And to another commenter's point - why is it specific to Debian and derivitaves based on Debian?

If you are in a company that has RHEL installed, apt anything will not do jack. Red Hat (and derivitaves) use Yum as the package manager. Of course, as u/LameBMX stated there are the Gentoo users that use neither apt or yum. I know there are others using other package managers as well, but I am not familiar with them so (unlike your professor) I am not going to speak to something I do not know :D

22

u/NoOrdinaryBees May 23 '26

💯

yum, dnf, pacman, zypp, portage, snap, and flatpak have entered the chat.

3

u/[deleted] May 23 '26

[removed] — view removed comment

→ More replies (2)

2

u/Vultureosa May 23 '26

...but before those apk and zypper. :D

→ More replies (1)

14

u/Hari___Seldon May 23 '26

why is it specific to Debian and derivitaves based on Debian?

You're expecting a level of nuance that almost never shows up in introductory Linux classes. Most of them teach perfunctory command line usage in bash, how to identify system variables, use of a simple editor like nano, and maybe a bit of scripting. If you go in actually knowing what a distro is, you've pretty much aced the class already.

I deep-dived this a few years go (long, fairly irrelevant story why) and was surprised to see that many schools treat that as a 1 or 2 semester-hour class that's basically just meant to be a check on a list before getting to "real topics".

10

u/Arts_Prodigy May 23 '26 edited May 26 '26

Just want to let you know that dnf is the standard for redhat package management now. Although yum isn’t wrong but just in case anyone else gets confused later.

3

u/radiowave911 May 23 '26

Thanks. RH is the only other one I have used and, admittedly, not had to deal with for some time. Thanks for the correction/update.

5

u/Alpha3031 May 22 '26

Hmm, pkcon update has some degree of distro independence assuming it's installed. It won't work everywhere of course, and I don't know if there's a list of supported backends somewhere.

3

u/MoobyTheGoldenSock May 22 '26

It doesn't have to be but listing Debian-only answers is still consistent with the question. The multiple choices could have been apt update, pacman -Ss, apk update, dnf update with the same exact question.

→ More replies (6)

9

u/Huecuva May 22 '26

Yeah, OP's prof seems like a complete tool. 

→ More replies (1)

4

u/Hari___Seldon May 23 '26

Why is your professor teaching this class if he doesn't know what the hell he's talking about?

Most intro classes like this pay abysmal rates for the semester, so instead of getting top staff, they often go to grad students or barely qualified professionals who are trying to pad their low industry income. They're not competitive opportunities filled by staff trying to enlighten future minds.

I know that the local community college (in a major city, ranked top 3% of CCs in the US) was paying $1100 for the semester for the Intro to Linux class about 7 years ago. With the funding hits that have happened between the epidemic and the last year's blood bath, many schools are barely scraping by or being forced to drop these classes entirely. The contract offers are flat or even lower than they were pre-cooties.

→ More replies (2)

28

u/vacri May 22 '26

'update' in apt terminology means "fetch me the package lists, so I can see if there are any new versions"

'upgrade' in apt terminology means "I will install packages from the lists that have higher version numbers than what is currently installed"

20

u/pnlrogue1 May 22 '26

He didn't dodge anything. He's flat-out wrong about part of his answer to you and the question itself explicitly asks about installing updates and none of those commands do that.

This is a silly question anyway because that's not a Linux command - it's a command for the apt package manager which is only generally used on Debian-based distributions. Ask him to try any of those commands on Fedora/Red Hat or Arch. At least apt[-get] update will do something on Debian/Ubuntu/Mint/etc but Red Hat and Arch based distros, amongst others, will simply fail as they use different package managers entirely.

14

u/LameBMX May 22 '26

none of those work for me?

emerge world -u

thats the trick.

really, the prof of comp science shouldn't be using Debian specific stuff as examples under a generic "linux" header. pretty sure redhat is still a solid force in his students future world if they go the *nix route.

3

u/jrcomputing May 22 '26

emerge -vauUD @world is my go-to.

11

u/soopastar May 22 '26

that is sooo bad. update just does that - updates the package details available to the sytem. upgrade is the way to install updates. thats just...wow.

3

u/gosand May 22 '26

If we're going to be correct here, it cannot just be apt upgrade UNLESS you do an apt update first or had done that since the last upgrade. The question said to update installed programs.

The correct answer is E. RTFM

7

u/MajesticDisaster3977 May 23 '26

Your prof is teaching you something important. There are lots of people who don't know what they're talking about and forget that the manual page exists.

5

u/computer-machine May 22 '26

apt update and apt-get update both simply reach out to the repo(s)/PPAs and download a list of available packages and their versions.

A simple solution you students could use to solve this would be to ask him to show everyone installing new versions of programs using apt-get update.

1

u/virtualstaticvoid May 22 '26

E. None of the above ✅

1

u/Leather_Secretary_13 May 22 '26

So... none of these are Linux commands, they are debian/ubuntu package manager commands. just a heads up. standard linux commands are done via an ABI via libc.

1

u/Prestigious_Copy154 May 23 '26

Lmao your professor is straight up just wrong

→ More replies (4)