Apt-get upgrade vs update


















Active 2 years, 1 month ago. Viewed k times. What is the difference between apt-get update and apt-get upgrade? Which should I run first? Do any of them automatically run the other? Improve this question. Braiam The Student The Student 11k 27 27 gold badges 58 58 silver badges 93 93 bronze badges.

See: askubuntu. Possible duplicate of: askubuntu. Add a comment. Active Oldest Votes. After updating the lists, the package manager knows about available updates for the software you have installed. This is why you first want to update. Improve this answer. Timo Kluck Timo Kluck 8, 1 1 gold badge 18 18 silver badges 18 18 bronze badges. Keep in mind that most of the times instead of apt-get upgrade what you want to do is apt-get dist-upgrade — fdierre. You can try going to this link.

The screenshot below shows its contents. Downloading and extracting the Sources. You can open it using any text editor and it reveals a massive, more than 28, lines long file! The screenshot above shows one of the packages named zsh an alternative of bash shells , and the information it contains. As you can see it contains information like.

For example, consider this situation. I hope you got the point! Maybe you need to install a specific newly released software and leave the rest of the system untouched. In that case, all you need to do is enter the following commands. If you really need to upgrade all the packages in your system in a single line of command, you can also enter something like. The Kernel is a special part of the OS and messing it up can mean messing up the entire system! Hence we have a special command for upgrading it.

The above command will basically upgrade everything in your system, all the packages, and the kernel to the latest versions as supported by your repositories! It does so in a smart way so that it automatically deletes the leftover unnecessary packages to free up your harddisk as a bonus!

For example, if you are presently using Ubuntu You can email us or contact us through this link if you have any questions or suggestions. You can think of them as 2 different remotes to control the same TV, one has more options are are suited for techy users while the other is meant for beginners. If you are interested to learn more about how software packages are managed in Linux I highly recommend reading the article in the link below.

The kernel is a special software that takes all the available hardware resources and virtualizes and manages them. The software packages are typically applications that we run which can make use of these hardware resources by requesting access to them through the kernel. Examples of software packages can include application software like text editors, word processors, etc. The content of the packages managed by these package managers involves the following 4 main components.

This is the next question we must address. Repositories or repos for short are basically a place where verified packages are stored for easy retrieval and installation. They can be online like the APT repository or they can be on a local folder or a DVD where you have a special collection of software that you need. You can have several repositories from which you can download and install these packages. These can be. This is a list of packages available for installing on a given distro.

This list is maintained by your Linux machine. The information in this list usually includes the locations of various repositories from which software can be installed.

These locations are usually on the internet. You can view and edit this list the same way you can view any other text files using one of your favorite text editors like vs-code, gedit, nano or vim. If you are using Ubuntu or one of its derivatives, you can also view this list by typing in the following command in the Linux terminal. As you can see from the above screenshot, this list basically contains some URLs to locations on the internet. From these locations, further information can be collected like.

You can try going to this link. The screenshot below shows its contents. Downloading and extracting the Sources. You can open it using any text editor and it reveals a massive file with more than 28, lines!

Let us just focus on the apt update command this time around, as we have already established the fact that both these commands do almost exactly the same thing! This is the reason we need to run either of these commands regularly before we install any software so that the lists we use to get our software packages are always up-to-date! So the next logical question to ask is, is there a better way to quickly remind yourself of what this command means without going onto the internet?

The answer is yes, it is possible and the best way to do this is by using the man command from the CLI! To scroll this page, you can use the Enter button to go one line at a time, or you can use the space-bar to go one page at a time.

If you wish to close this and get back to the terminal, just press the key Q.



0コメント

  • 1000 / 1000