OnWorks Linux and Windows Online WorkStations

Logo

Free Hosting Online for WorkStations

< Previous | Contents | Next >

8.2.3. Upgrading Kali Linux‌‌


As a rolling distribution, Kali Linux has spectacular upgrade capabilities. In this section, we will take a look at how simple it is to upgrade Kali, and we will discuss strategies for planning your updates.

We recommend regular upgrades, because they will install the latest security updates. To upgrade, use apt update followed by either apt upgrade, apt-get upgrade, or aptitude safe-upgrade. These commands look for installed packages that can be upgraded without removing any packages. In other words, the goal is to ensure the least intrusive upgrade possible. The apt-get command line tool is slightly more demanding than aptitude or apt because it will refuse to install packages that were not installed beforehand.

The apt tool will generally select the most recent version number (except for packages from kali- bleeding-edge, which are ignored by default whatever their version number).

To tell apt to use a specific distribution when searching for upgraded packages, you need to use the -t or --target-release option, followed by the name of the distribution you want (for example: apt -t kali-rolling upgrade). To avoid specifying this option every time you use apt, you can add APT::Default-Release ”kali-rolling”; in the file /etc/apt/apt.conf.d/local.

For more important upgrades, such as major version upgrades, use apt full-upgrade. With this instruction, apt will complete the upgrade even if it has to remove some obsolete packages or install new dependencies. This is also the command that you should use for regular upgrades of your Kali Rolling system. It is so simple that it hardly needs explanation: APT’s reputation is based on this great functionality.

Unlike apt and aptitude, apt-get doesn’t know the full-upgrade command. Instead, you should use apt-get dist-upgrade (distribution upgrade), a well-known command that apt and aptitude also accept for backwards compatibility.


Be Aware of Important To anticipate some of these problems, you can install the apt-listchanges package, Changes which displays information about possible problems at the beginning of a pack- age upgrade. This information is compiled by the package maintainers and put in

/usr/share/doc/package/NEWS.Debian files for your benefit. Reading these files (possibly through apt-listchanges) should help you avoid nasty surprises.

Be Aware of Important To anticipate some of these problems, you can install the apt-listchanges package, Changes which displays information about possible problems at the beginning of a pack- age upgrade. This information is compiled by the package maintainers and put in

/usr/share/doc/package/NEWS.Debian files for your benefit. Reading these files (possibly through apt-listchanges) should help you avoid nasty surprises.


Since becoming a rolling distribution, Kali can receive upgrades several times a day. However, that might not be the best strategy. So, how often should you upgrade Kali Linux? There is no hard rule but there are some guidelines that can help you. You should upgrade:

• When you are aware of a security issue that is fixed in an update

• When you suspect that an updated version might fix a bug that you are experiencing

• Before reporting a bug to make sure it is still present in the latest version that you have available

• Often enough to get the security fixes that you have not heard about

There are also cases where it is best to not upgrade. For example, it might not be a good idea to upgrade:

• If you can’t afford any breakage (for example, because you go offline, or because you are about to give a presentation with your computer); it is best to do the upgrade later, when you have enough time to troubleshoot any issue introduced in the process.

• If a disruptive change happened recently (or is still ongoing) and you fear that all issues have not yet been discovered. For example, when a new GNOME version is released, not all packages are updated at the same time and you are likely to have a mix of packages with the old version and the new version. Most of the time this is fine and it helps everybody to release those updates progressively, but there are always exceptions and some applications might be broken due to such discrepancies.

• If the apt full-upgrade output tells you that it will remove packages that you consider important for your work. In those cases, you want to review the situation and try to under- stand why apt wants to remove them. Maybe the packages are currently broken and in this case you might want to wait until fixed versions are available, or they have been obsoleted and you should identify their replacements and then proceed with the full upgrade anyway.

In general, we recommend that you upgrade Kali at least once a week. You can certainly upgrade daily but it doesn’t make sense to do it more often than that. Even if mirrors are synchronized four times a day, the updates coming from Debian usually land only once a day.


Top OS Cloud Computing at OnWorks: