14

I'm not sure if this has been asked as I couldn't find it under the search feature, but I recently upgraded my kernel and installed other .deb packages and was curious if the .deb file could be deleted after install or if it was an integral part of the program itself.

Edit: I asked this not for things downloaded through apt-get to /var/cache/apt/archives but for using wget which saved to the root of my home folder, namely for when updating the kernel through command line

2 Answers2

13

There is no matter you can delete .deb when you finish using it whatever the method of installation.

I'm giving you here an example how Ubuntu system really deal with .deb so it's just to know that it's not dangerous to delete them since Ubuntu itself gives you the way to do. For example, the installation method of Ubuntu when you use software center or using apt-get is to download first the .deb to /var/cache/apt/archives then installing these .debs using dpkg.

So when finish installation there is no need for system to those .debs, unless you can use them if you delete some package and you want to install it again and there is no update then the system uses this .deb instead of downloading again.

Moreover Ubuntu offers a neat command to clean those .debs, you can use

sudo apt-get clean

This will remove all .deb that are being downloaded before in the /var/cache/apt/archives

Maythux
  • 84,289
5

It's safe to delete the deb files. Just keep in mind that you should not delete them if you plan to re-install the same versions of the packages at a later point in time.

This should be helpful How do I remove cached .deb files?

boshra
  • 102
  • The big ones I was planning on removing was the 4.0 kernel .deb packages I installed after getting rid of Zorin and changing back to Ubuntu after a couple years away, so I don't think I'll be reinstalling the same version of that one, lol. Thanks! –  May 15 '15 at 16:45