Today I got a new VPS… well great but now I need to install a bunch of new packages and libraries and helper apps. how do I remember it all? did I have python 2.6 or 2.7? not to mention which boost libs did I install? well here.s a couple of ways to deal with this issue of whats on my installed package list.
Using dkpg and apt-get
dpkg –get-selections > selections.txt Scp / email / copy to USB or copy it bit by bit, whatever floats your boat. Move to new machine. dpkg –set-selections < selections.txt
apt-get update
apt-get upgrade voilà it should be ok. but there’s a lot of clutter, like libraries and dependencies that were needed on old machine and might not be needed again. so how to find a cleaned up list? or alteast one that shows the automated installed? there’s always aptitude its simpler in syntax and better imho
Using Aptitude
aptitude search '~i'
which gives you aresult of all your packages like :
i udev – /dev/ and hotplug management daemon
i A unattended-upgrades – automatic installation of security upgrades
i upstart – event-based init daemon
i A usbutils – Linux USB utilities
i util-linux – Miscellaneous system utilities
i vim – Vi IMproved – enhanced vi editor
i vim-common – Vi IMproved – Common files
i vim-runtime – Vi IMproved – Runtime files
i wget – retrieves files from the web
This of course scrolls all the packages past your view very quickly and can be …. hard on those of us that cant read 10000 words per minute. You can always output the results to a text file, note in my example I’m using the date command to insert current date and time into the file name, you can run this with a cron job to have a snapshot of your packages at a given time.
Or if you just want a temp text file you can output to less or vim the same way.
aptitude search '~i' | less
aptitude search '~i' | vim
and if you want you can even grep / search / parse it on the fly like so
aptitude search '~i' | grep -i "X11"
i A libxpm4 – X11 pixmap library
i A libxrandr2 – X11 RandR extension library
i A libxss1 – X11 Screen Saver extension library
i A libxt6 – X11 toolkit intrinsics library
i A libxtst6 – X11 Testing — Record extension library
i A libxv1 – X11 Video extension library
i A libxxf86dga1 – X11 Direct Graphics Access extension libra
i A libxxf86vm1 – X11 XFree86 video mode extension library
i A tk – Toolkit for Tcl and X11 (default version)
i A tk8.6 – Tk toolkit for Tcl and X11 v8.6 – windowin
i A x11-common – X Window System (X.Org) infrastructure
i A x11-utils – X11 utilities
Discover the world of Linux containers with LXC/LXD! Learn how containers streamline application deployment, offering efficient resource usage and enhanced portability compared to traditional virtual machines. Get started by setting up your own simple application container and experience the benefits firsthand.
This article delves into Ansible’s task and role inclusion commands, crucial for modularizing and reusing automation scripts. We explore `include_tasks`, `import_tasks`, `include_role`, and `import_role`, distinguishing between dynamic and static operations. Practical examples and best practices are provided to guide both beginners and advanced users in optimizing their playbooks for flexibility, manageability, and performance. These insights ensure users can efficiently leverage Ansible’s powerful features to enhance their IT automation strategies.
WordPress is a popular content management system (CMS) used to create and manage websites. It allows users to easily create and publish content using a user-friendly interface. Running WordPress in a Docker container allows for easier management, scalability, and portability of the WordPress installation. It provides a consistent environment for running WordPress, simplifies deployment, and allows for easy testing and experimentation with different configurations.