Useful commands

 

Getting help

$ nala --help

 

Update package lists

$ nala update

 

 

Update package lists and install upgrades

$ nala upgrade

 

Autoremove packages that are not needed

$ nala autoremove

 

 

Purge packages that are not needed

$ nala autopurge
 

 

Clean local archive of packages

$ nala clean

 

 

Search packages

$ nala search <package name>

 

 

Configure closest repos and mirrors

The command will fetch the three fastest https mirrors for Ubuntu 22.04 Jammy for Sweden and write them to /etc/apt/sources.list.d/nala-sources.list.

$ nala fetch --ubuntu jammy --auto --https-only -c se --sources
$ cat /etc/apt/sources.list.d/nala-sources.list
# Sources file built for nala
deb https://mirror.se.altushost.com/ubuntu/ jammy main restricted universe multiverse
deb-src https://mirror.se.altushost.com/ubuntu/ jammy main restricted universe multiverse
deb https://mirror.bahnhof.net/ubuntu/ jammy main restricted universe multiverse
deb-src https://mirror.bahnhof.net/ubuntu/ jammy main restricted universe multiverse
deb https://ftp.lysator.liu.se/ubuntu/ jammy main restricted universe multiverse
deb-src https://ftp.lysator.liu.se/ubuntu/ jammy main restricted universe multiverse

 

 

Quality of life-fixes with nala

$ nano ~/.bashrc

Add an alias as below, save and exit.

alias nn='nala upgrade && nala autoremove'

Now test the new alias.

$ nn
╭─ Updating Package List ──────────────────────────────────────────────────────────────────────────╮
│Updated: https://ftp.lysator.liu.se/ubuntu jammy/multiverse DEP-11 48x48 Icons [43 KB] │
│Updated: https://ftp.lysator.liu.se/ubuntu jammy/multiverse DEP-11 64x64 Icons [193 KB] │
│Updated: https://ftp.lysator.liu.se/ubuntu jammy/multiverse DEP-11 64x64@2 Icons [214 Bytes] │
│Updated: https://ftp.lysator.liu.se/ubuntu jammy/multiverse DEP-11 128x128 Icons [253 KB] │
│Updated: https://ftp.lysator.liu.se/ubuntu jammy/multiverse amd64 c-n-f Metadata [8 KB] │
│Updated: https://ubuntu.mirror.su.se/ubuntu jammy/universe amd64 Packages [14.1 MB] │
│Updated: https://ubuntu.mirror.su.se/ubuntu jammy/universe Translation-en [5.7 MB] │
│Updated: https://ubuntu.mirror.su.se/ubuntu jammy/universe amd64 DEP-11 Metadata [3.6 MB] │
│Updated: https://ubuntu.mirror.su.se/ubuntu jammy/universe DEP-11 48x48 Icons [3.4 MB] │
│Updated: https://ubuntu.mirror.su.se/ubuntu jammy/universe DEP-11 64x64 Icons [7.6 MB] │
│Updated: https://ubuntu.mirror.su.se/ubuntu jammy/universe DEP-11 64x64@2 Icons [69 KB] │
│Updated: https://ubuntu.mirror.su.se/ubuntu jammy/universe DEP-11 128x128 Icons [12.5 MB] │
│Updated: https://ubuntu.mirror.su.se/ubuntu jammy/universe amd64 c-n-f Metadata [286 KB] │
│Updated: https://ubuntu.mirror.su.se/ubuntu jammy/multiverse amd64 Packages [217 KB] │
│Updated: https://ubuntu.mirror.su.se/ubuntu jammy/multiverse i386 Packages [112 KB] │
│Updated: https://ubuntu.mirror.su.se/ubuntu jammy/multiverse Translation-en [112 KB] │
│Updated: https://ubuntu.mirror.su.se/ubuntu jammy/multiverse amd64 DEP-11 Metadata [42 KB] │
│Updated: https://ubuntu.mirror.su.se/ubuntu jammy/multiverse DEP-11 48x48 Icons [43 KB] │
│Updated: https://ubuntu.mirror.su.se/ubuntu jammy/multiverse DEP-11 64x64 Icons [193 KB] │
│Updated: https://ubuntu.mirror.su.se/ubuntu jammy/multiverse DEP-11 64x64@2 Icons [214 Bytes] │
│Updated: https://ubuntu.mirror.su.se/ubuntu jammy/multiverse DEP-11 128x128 Icons [253 KB] │
│Updated: https://ubuntu.mirror.su.se/ubuntu jammy/multiverse amd64 c-n-f Metadata [8 KB] │
│Fetched 180.2 MB in 17s (10.6 MB/s) │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯
All packages are up to date.
Nothing for Nala to remove.

 

 

Sources

https://gitlab.com/volian/nala/-/blob/main/docs/nala-fetch.8.rst

https://askubuntu.com/questions/1463774/nala-broke-my-apt-package-manager

https://phoenixnap.com/kb/nala-apt

 

 

 

 

Stop Spam Harvesters, Join Project Honey Pot

 

Get a free SSL certificate!

 

The leading nonprofit defending digital privacy, free speech, and innovation.

 

The Linux Foundation provides a neutral, trusted hub for developers and organizations to code, manage, and scale open technology projects and ecosystems.

 

Kubuntu is an operating system built by a worldwide community of developers, testers, supporters and translators.

 

 43ef5c89 CanonicalUbuntudarktext