Ubuntu – Install deb package with all dependencies in same folder

aptcachedpkg

I need to install multiple deb files of same software from apt cache in another ubuntu installation.

For example, I have all deb files of vlc in same folder(/var/cache/apt/archives). I need to install vlc with all dependencies satisfied. I cannot install it using dpkg -i vlc* because of dependencies.

Is there a solution to this. I have many software packgaes in my cache which I dont want to download again. Please help..

Best Answer

Indeed you have many solutions:

  • Copy all .deb files from /var/cache/apt/archives to the new pc to the directory /var/cache/apt/archives, or just copy the .deb of vlc dependencies only instead of copying all those debs. you can know the dependencies of vlc by command apt-cache rdepends vlc. Now once you have those debs in the /var/cache/apt/archives of the second system then you can run sudo apt-get update then sudo apt-get install vlc.

BUT this only works if the two systems have same OS version and same package version with same updates.more info

  • Another solution which is better is to make your own repository so you can install any application you want without fearing of dependencies hell when offline installation. take a look: https://askubuntu.com/a/648969/150504
Related Question