It's completely wrong that purge-old-kernels is in Byobu, rather than in the kernel or directly handled by dpkg/apt. Thanks for all the feedback here -- we'll get that cleaned up in 17.10!
For `apt-get install purge-old-kernels` I get
E: Could not open lock file /var/lib/dpkg/lock - open (13: Permission denied)
E: Unable to lock the administration directory (/var/lib/dpkg/), are you root?
And for `sudo apt-get install purge-old-kernels`, I get Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package purge-old-kernels
But I can reproduce your error by `purge-old-kernels` alone. That is indeed strange.EDIT: I straced bash by `strace -o bashlog -f -s 10000 bash` and found the culprit to be /usr/lib/command-not-found. Indeed, if you run `/usr/lib/command-not-found -- purge-old-kernels` directly, you get that same message about byobu.
EDIT2: I assumed this was some kind of bug with the database, but now I actually tried installing byobu and it does make purge-old-kernels available.
E: Unable to lock the administration directory (/var/lib/dpkg/), are you root?
^^^^^^^^^^^^^
In your case, you didn't prepend `sudo`.Regarding the second, which is instead the core of the problem, see the man page (http://manpages.ubuntu.com/manpages/xenial/man1/purge-old-ke...):
Provided by: byobu_5.106-0ubuntu1_all bug
Therefore the correct (and full) command is: sudo apt-get install byobu
As pointed out in another comment, such package is arguably a poor placement for this type of utility.You don't ned to use packages.debian.org to look up what packages do.
> apt show byobu .. Description: text window manager, shell multiplexer, integrated DevOps environment Byobu is Ubuntu's powerful text-based window manager, shell multiplexer, and integrated DevOps environment.
* http://packages.ubuntu.com/yakkety/all/byobu/filelist
(-:
But yes, you're very right. It needs to be moved out.
https://packages.debian.org/jessie/byobu "Using Byobu, you can quickly create and move between different windows over a single SSH connection or TTY terminal, split each of those windows into multiple panes, monitor dozens of important statistics about your system, detach and reattach to sessions later while your programs continue to run in the background."
Uhm... what?