DebianThis forum is for the discussion of Debian Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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. 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.
* You may have to update dpkg's list of available packages or it will just ignore your selections (see this debian bug for more info). You should do this before sudo dpkg --set-selections < ~/Package.list, like this:
Before you reinstall, you should probably back up the settings from some of your programs, this can easily be done by grabbing folders from /etc and all the content from your user directory (not just the stuff you can see in nautilus!):
This assumes there is only one user on the machine (remove /'whoami' otherwise) and that you used the same username on both installs (modify dest. of rsync otherwise).
Distribution: Ubuntu based stuff for the most part
Posts: 1,177
Rep:
apt-clone will do the above in one command.
Quote:
Description: Script to create state bundles
This package can be used to clone/restore the packages on a apt based
system. It will save/restore the packages, sources.list, keyring and
automatic-installed states. It can also save/restore no longer
downloadable packages using dpkg-repack.
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.
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!
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.
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?
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.
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".
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.