How to skip kernel update in Kali Linux? beginners guide 2021

How to skip kernel update in Kali Linux?

Today I have seen a comment on my post, it was really very inspiring for me because according to this question I was missing some things in my previous post How to update and upgrade Kali Linux to 2017.2. 

Either I forgot about this requirement or This concept had been not entered my mind. But after reading this comment I realized ” I will have to write article rather than write a reply on that comment.

So I am no taking a long time I am going to post a screenshot of that comment, so you can see the question below.

How to skip kernel update in Kali Linux?

Exactly, I faced a problem related to this issue in Kali Linux virtual machine but I didn’t take it seriously.

Explanation:  I installed Kali Linux on Virtual box, New version of Kali Linux has been released later and I had to update it. After updating Kali Linux in the newer version I have to update Virtualbox guest additions in the newest version. I write an article related it Re-Install guest addition after update Virtual box for Kali Linux.

How to skip kernel update in Kali Linux

Whatever, What is the reason? why dont you want to  kernel updateIt is not matter for me.

I write here what I did on my machine after reading the comments. And I am willing to help others.

Check current version of Kernel in Kali Linux:

Similar as other Linux you can use simple command to see kernel version in Kali Linux

#uname -r

Check current version of Kernel in Kali Linux

Blocking packages with apt/dpkg

As you know “In Linux packages are managed by apt or dpkg in Kali Linux”. When we upgrade newer version of tools, kernel or other utility, First all packages are downloaded from repositories in local computer, then installed in machine. Before start installation process administrator user can hold any package to install. So the old version remain same in your machine and newer version will not install.

How to hold packages with apt/dpkg:

following command can be executed to hold any package

#echo kernel_package_name hold | dpkg --set-selections

Replace the Kernel_package_name with current kernel package name.

How to hold packages with apt/dpkg

How to know current kernel package name in Kali Linux:

Following Command:

#echo $(dpkg -l "*$(uname -r)*" | grep image | awk '{print $2}')
Now you will have the kernel name set the kernel in above command and hold kernel packages name for being install.

How to know current kernel package name in Kali Linux

How to remove pin from Apt/dpkg:

Command

echo kernel_package install | dpkg --set-selections

What is problem, I faced: 

When I executed following command, I faced problem.

Erorr-to-hold-package

Again I tried to reconfigure dpkg but get same error:

same-error-again

Solution: 

If you are facing such type of error, dont worry! This is happened, because I have some interrupted package management process. But it may possible, you will not face this problem. I added this part because it will help stupid people like me, who left system in process and start working on another system, after some time they forgot about it. and at last start weeping for invited problem 🙁 

Whatever Solution is here:

I dont want to write commands here:

Please do it by yourself:

If you still have any problems, Don’t worry. I am still here Write the issue in the comment box.

Cheers!

If Appreciate My Work, You should consider:

One thought on “How to skip kernel update in Kali Linux? beginners guide 2021

Leave a Reply

Your email address will not be published. Required fields are marked *