OnWorks Linux and Windows Online WorkStations

Logo

Free Hosting Online for WorkStations

< Previous | Contents | Next >

8.3.4. Tracking Automatically Installed Packages‌


One of the essential functionalities of apt is the tracking of packages installed only through de- pendencies. These packages are called automatic and often include libraries.

With this information, when packages are removed, the package managers can compute a list of automatic packages that are no longer needed (because there are no manually installed packages depending on them). The command apt autoremove will get rid of those packages. Aptitude does

not have this command because it removes them automatically as soon as they are identified. In all cases, the tools display a clear message listing the affected packages.

It is a good habit to mark as automatic any package that you don’t need directly so that they are automatically removed when they aren’t necessary anymore. You can use apt-mark auto package to mark the given package as automatic, whereas apt-mark manual package does the opposite. aptitude markauto and aptitude unmarkauto work in the same way, although they offer more features for marking many packages at once (see section 8.2.7.1, “Aptitude” [page 190]). The console-based interactive interface of aptitude also makes it easy to review the automatic flag on many packages.

You might want to know why an automatically installed package is present on the system. To get this information from the command line, you can use aptitude why package (apt and apt-get have no similar feature):


$ aptitude why python-debian

i aptitude Recommends apt-xapian-index

i A apt-xapian-index Depends python-debian (>= 0.1.15)

$ aptitude why python-debian

i aptitude Recommends apt-xapian-index

i A apt-xapian-index Depends python-debian (>= 0.1.15)


Top OS Cloud Computing at OnWorks: