echo 'Binary::apt::APT::Keep-Downloaded-Packages "true";' \ > /etc/apt/apt.conf.d/01keep-debs
Following Apt News, I performed the operation in the title to configure apt to keep the packages in the archives. From observation, the switch autoclean whether apt or apt-get removes packages which are not downloadable, that is, those packages which are not represented in the repositories' /etc/apt/sources.list or equivalent.
Is there an easy script to remove debs from /var/cache/apt/archives which are not installed to keep things tidy--comparing the contents of all installed packages versus those found in the archive and then remove those that aren't installed? Thanks. |
|
Thanks. However, that autoclean behavior is not desired. Say for instance bzflag and its dependencies were installed and uninstalled, after an autoclean those packages would remain. After say, building an OS in a virtual environment, I copy all those debs over to a basic install and use dpkg to install those, then I get programs I didn't want.
I will have to learn scripting and such. Seems difficult now; however, after some studying and trials, I should be able to piece it together. A basic flow would be to build a list of all installed packages, then compare each file in the archives, and delete those not in the list. Thought someone here could just kind of spit it out or offer something or some things similar that I could modify or piece together. |
Different ways to backup packages:
Quote:
|
apt-clone will do the above in one command.
Quote:
|
Thanks! I will check out these options. Made a big booboo and having to image drive with an older backup. At least while I'm at it, I can adjust the size of the swap partition just in case hibernation comes back, or if running virtual machines needs to swap.
Again, thanks. Happy Holidays and New Year! |
Evil Craig, noice! Kinda-ish remember doing something like this years ago minus the rsync. I just downloaded all installed packages, placed them in the archives, and used dpkg -i *.deb IIRC after an update of course. Yup, it's a hack way of doing it. I am trying to learn a better approach.
Utek, apt-clone would have been another option to explore; but at this time, apt-clone is not part of Bookworm. I believe it and other packages are in a normal transition/migration and/or preparing for the planned freeze in February to become the new Stable. I will keep an eye out for it. Thanks again. Merry Christmas to me, Debian finally got (not the latest) Blender into Bookworm! It's been like a year! |
in vboxcan't download but in physial machine working
in vbox can't download from official repo but in physial machine working
the version debian 11 install in vm and laptop when try install/download a packages in virtualbox it not working but in laptop download running well any advice? |
Although this post is marked solved, I'm no expert by any means, and I believe that you should start a new thread to get more visibility, let me ask a few questions. You never know, we might get lucky, and I could pass along the good blessings/tidings of those that were in the spirit to aid me.
1) Are you able to download or use the web from your vm? 2) During installation of Debian 11 on your vm, were you able to connect with server repositories? 3) If you were able to download from server repositories during installation, what did you select in Tasksel; that is, what did you check in configuring software? 4) Again, if you were able to connect and finish installation of software from repositories, does your vm have the same /etc/apt/sources.list as your host (physical laptop)? If not, please reply with contents of /etc/apt/sources.list of vm. 5) Post contents of /etc/network/interfaces of vm. This will get diagnosis started. Maybe we will get it, or it will help others with better knowledge and experience get involved. |
Thank you so much
So the debian is ova file that i import to vbox and the interface text based not use gui. This connect to inet like ping and apt update, and version is last upgrade from official repository. The problem is when i download some packages like curl libnet its looks like not available in the repository. If the laptop directly install to the hardisk and interface is gui. This connect to inet and its a last upgrade from official repository (same with debian that install in vbox above). When i try to download packages like curl or libnet its running well the packages install successful. I so confuse whether the virtualbox (using version 7)or the repository that i take from wiki debian. Any advice? |
1 Attachment(s)
From terminal input
Code:
$ ip addr show && cat /etc/network/interfaces The thumbnail is output from of a virtual machine, Debian Bookworm, with only Basic System Utilities. The only difference between our implementations is the use of Virtualbox vs. Virt-Manager. Keeping it simple, you will need to edit and save this file from an elevated prompt, restart or use the correct commands in terminal to restart the networking services. Code:
% sudo nano /etc/network/interfaces Code:
# nano /etc/network/interfaces If for some reason you install Network-Manager or it becomes a dependency, you will need to comment out or remove the lines in the section "The primary network interface". |
All times are GMT -5. The time now is 04:50 PM. |