I am using the command inside a script that I use to install a list of software that I need on a fresh distro installation.īecause it is considered good practice to know beforehand how much space and resources a given package needs before installing that on our machines.I am very familiar with the command and I know I need to press Y to confirm things or.I would avoid using the – y option unless Okay now let us try running the same command with the -y option sudo apt upgrade -y outputĪs you can see there is no prompt asking you to confirm if the list is okay, so in the case, you “the factory owner” has decided to that you have enough space on your factory and asked “ apt “the manager to install everything without further questions. Now by giving the “ upgrade” command to our manager, we are in essence telling him to buy the latest available Macbook and replace the old ones! After running the sudo apt upgrade command, software_X will be updated to version 1.3.1.Ĭontinuing with our factory analogy, let us say all the workers are using a 2015 Macbook model for doing all computer tasks. output2: sudo apt upgradeįor example say software_X has version 1.2.2 installed on our system, but a newer version, say 1.3.1 is available in the repo. The packages mentioned in the following line have newer versions available no the repo and once you press “Y”(for yes) and press the “Enter” button, the apt application will download and install the updated packages on your Linux machine as shown in the screenshot below. Your output might look a bit different than mine, but the important things to note here is the line that says “The following packages will be upgraded:”. The output of the command “ sudo apt upgrade” (without the -y option)is shown in the screenshot below output1: sudo apt upgrade (without the -y option) Let us start by running the command without the -y option The apt command is responsible for installation, removal, and updating of software in our system.Ī good analogy is to think of your computer as a factory and the apt command as the manager in that factory who is responsible for the installation of new equipment, removal of equipment that is no longer needed, and update desired equipment to their latest versions, while maintaining records of the equipment names and versions which are currently present in the factory. Let us start by exploring the answer to the question “What does apt do?” I can see that the above paragraph has too many “technical terms” (which I promised not to use!) but that is just the short version of the answer to explain the command “ sudo apt upgrade -y“, so do not worry if you don’t understand every word in that paragraph!īy the end of this article we will get back to this short answer version and by that time I am sure you will be able to understand what every word meant in the short answer above! What is the meaning of the command “ sudo apt upgrade -y“? sudo apt upgrade -y is the command used to download any available updates and apply them to the out-dated packages installed in a Linux system without prompting the user to confirm the changes Let us see what this command does, how it does that, and the reason you need to do this every time you need to install an app on your Linux computer.įor those of you in a hurry, here is the short version of the answer! The Short Version of the Answer In this article, I have tried to explain what this command means from a beginner’s perspective avoiding unnecessary “technical terms” and I have tried to keep this article concise so that you can get through the entire article in about 10 to 20 mins max! I guess to beginners, it just feels like a magic spell to get something installed! I was just happy that I was able to type something in the Terminal and that it actually worked and did what I wanted it to do! I did not pay much attention to what I actually typed in.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |