Advanced Package Tool (
apt-get updateupdates the package index files, whereas
apt-get upgradeupgrades the actual packages installed on your system.
- What are package index files? They probably tell you where your packages are actually fetched
AHA-Moment (09-07-2023): OMG today ashwin taught me about how apt actually works. There are people who have servers storing the images.
For instance, if you do,
sudo apt install ros-humble-slam-toolbox
what this is actually doing is fetching from some sort of server.
Which means if for example you are running Ubuntu 20.04 or older, those people might not have a version for your specific distribution of linux.
This is where NVIDIA might come in and host their own server, so that there IS a version that works.
The reason some of the Isaac ROS development is still on Ubuntu 20.04 (Focal) even though the latest ROS runs on Ubuntu 22.04 (Jammy)
What Happens under the Hood
So it actually runs DPKG.
How Packages are Added in Ubuntu with
sudo apt install
- Fetching Package Info: When you issue
sudo apt install, the first thing that happens is that the Advanced Package Tool (APT) will update its local package lists from the repositories defined in
/etc/apt/sources.list.d/. This ensures that you are installing the latest available version of the package.
- Dependency Resolution: APT will then identify all the dependencies needed for the desired package. If these are not already installed, APT will include them in the installation process.
- Package Download: The package files (.deb) and their dependencies are downloaded from the repository to your local machine.
- Package Verification: Before installation, APT will use the GPG Keys to verify the integrity of the downloaded package files. This ensures that the packages haven’t been tampered with and are coming from a trusted source.
- Installation: Finally, the downloaded
.debfiles are extracted, and the package is installed on the system. This might include placing executable files in appropriate directories, adding new system services, or updating libraries.