News for hackers. Stuff that matters.
Re:Ask HN: What do you want to see in Ubuntu 17.10? by no_gravity on Friday March 31, 2017 @09:52AM (#14003753)
$ apt-get install purge-old-kernels

    The program 'purge-old-kernels' is currently not installed.
    You can install it by typing: apt install byobu
"byobu"? packages.debian.org to the rescue...

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?

Re:Ask HN: What do you want to see in Ubuntu 17.10? by dustinkirkland on Monday April 03, 2017 @03:39PM (#14026353)
So I'm the author of both Byobu and purge-old-kernels. It's in Debian, because I help push it there after I push it to Ubuntu.

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!

Re:Ask HN: What do you want to see in Ubuntu 17.10? by yorwba on Friday March 31, 2017 @11:03AM (#14004494)
Are you sure you typed exactly that?

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.

Re:Ask HN: What do you want to see in Ubuntu 17.10? by pizza234 on Friday March 31, 2017 @11:15AM (#14004633)
The first of the two errors has nothing to do with the package itself - packages need root permisions to be managed, which is what exactly the error is telling you:

    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.
Re:Ask HN: What do you want to see in Ubuntu 17.10? by yorwba on Friday March 31, 2017 @11:41AM (#14004916)
I'm aware that the first errors don't have anything to do with the package itself, but this was the command line given. I was wondering what kind of setup might lead to an apt-get command (without sudo even) to display that error message.
Re:Ask HN: What do you want to see in Ubuntu 17.10? by pizza234 on Friday March 31, 2017 @05:28PM (#14008469)
One case (which may be irrelevant in this context, but still a valid scenario) is auto-updates being executed in the background.
Re:Ask HN: What do you want to see in Ubuntu 17.10? by justinsaccount on Friday March 31, 2017 @10:16AM (#14003994)
> "byobu"? packages.debian.org to the rescue...

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.

Re:Ask HN: What do you want to see in Ubuntu 17.10? by JdeBP on Friday March 31, 2017 @11:09AM (#14004568)
Quite right. One uses packages.ubuntu.com:

* http://packages.ubuntu.com/yakkety/all/byobu/filelist

(-:

Re:Ask HN: What do you want to see in Ubuntu 17.10? by drostie on Friday March 31, 2017 @11:03AM (#14004488)
byobu is basically an abstraction over screen and tmux, letting you use either with some common keybindings for spawning new windows and a common toolbar at the bottom telling you disk usage and load average and the like. I am not sure why purge-old-kernels is in the byobu package, that seems like a really poor placement for it.
Re:Ask HN: What do you want to see in Ubuntu 17.10? by dustinkirkland on Friday March 31, 2017 @01:52PM (#14006244)
It is a bad place for it. But it's there because I wrote both of them, and Byobu is always everywhere I want it to be, and I generally always want purge-old-kernels there too.

But yes, you're very right. It needs to be moved out.

Re:Ask HN: What do you want to see in Ubuntu 17.10? by alphapapa on Friday March 31, 2017 @05:47PM (#14008614)
Forgive the intrusion, just want to say thanks for Byobu. I use it regularly, and it's much nicer than bare tmux or screen.
Re:Ask HN: What do you want to see in Ubuntu 17.10? by dustinkirkland on Monday April 03, 2017 @03:38PM (#14026337)
:-) Thanks!