How to delete all the lines in one go in emacs?

emacs

Solution

`C-u 9999999 C-k` should do the trick.

If you are not at the beginning of the first line you want to kill, then use `C-a C-u 9999999 C-k`.

(The `9999999` can be any number larger than the number of lines you want to kill.)

An alternative to using `C-u 999999` is to hold down the `Control` key and then hold down `9`, so you get, in effect: `C-9 C-9 C-9 C-9 C-9 C-9 C-9 C-k`.

Problem

I want to delete all the lines below a particular line of emacs ? Is there any shortcut key which can delete all the lines below a particular line?

Original source