5 TIPS FOR MANAGING DEBIAN PACKAGES

If you’ve ever suspicion “there should be the command- which does X” for Linux, there substantially is. Finding it, however, is not regularly easy. This is generally loyal when handling packages upon Debian-based systems.


Debian’s package collection (dpkg, the APT apartment and- utilities similar to aptitude) have the basis of installing and- handling packages really easy. When we wish to do some-more formidable things, however, they’re still easy(ish), though the options or collection we wish have been not as well-advertised.

One thing which is mostly use-ful is to know because the package was installed. To find out, we wish to use- the aptitude utility, which will yield this really simply and- quickly. Use- aptitude because packagename to find out what package requires or suggests the package.

If we wish to implement packages which have been “kept back,” you’ll mostly listen to people indicate which we use- dist-upgrade instead of upgrade. However, the improved approach to do this — though carrying the garland of updates brazen which we might not want, is to use- aptitude instead of apt-get.

Occasionally, we contingency know what package the record belongs to, or what files have been in the package. For the record that’s installed, use- dpkg -S filename. For example, if we do not have Sendmail commissioned and- wish to know what package owns the symlink for /usr/lib/sendmail, we can run dpkg -S /usr/lib/sendmail. In my case, this returns:

postfix: /usr/lib/sendmail

What if we wish to know what package would implement the file? That’s the pursuit for apt-file. Note which this application might not be commissioned by default. You’ll additionally need to refurbish the cache by regulating apt-file update. Then run apt-file filename which we wish to see. The some-more specific we can be, the better. If we demeanour for the singular fibre that’s expected to be in most filenames (like “vim”), you’ll get utterly the couple of results. If we demeanour for something really specific similar to /usr/lib/xml2Conf.sh, afterwards it will yield usually the single result. So if we poke for /etc/apache2/apache2.conf even upon the complement though Apache installed, it will discuss it me which the package I’m seeking for is apache2.2-common.

Last, though really not least, let’s demeanour during saving the list of all commissioned software. Say we wish to do the purify implement of Debian (or the Debian derivative) to ascent rsther than than apt-get dist-upgrade, though we do not wish to figure out by hearing and- blunder what packages we had prior to — simply run dpkg–get-selections, and- you’ll see the full list of packages which have been installed. Here, we additionally notice which my Linux Mint desktop has some-more than 4 times as most packages commissioned as my Debian server.

But what about restoring the packages? That’s easy. Run dpkg–get-selections > installed-packages.txt. When we have the purify system, run dpkg–set-selections < installed-packages.txt. Do be certain to behind this record up prior to you do the install, of course.

While we lend towards to be prejudiced to Debian packages, there’s no reason Debian use-rs should have all the fun. Next week, I’ll take the demeanour during tips for regulating RPM and- Yum.

Related

News 6434819715854772876

Post a Comment

emo-but-icon

Most Top Article

Follow Us

Hot in week

item