Aptitude manually installed packages
In this article, we will go through 10 apt-mark command examples for package administration in Linux. We will see some of the real world examples of apt-mark command in below section. More about apt-mark. If you want to check apt-mark command version then you need to use apt-mark --version command as shown below.
As you answer "y" to each question just push Enter to move quickly , debfoster will collect the package list and write them line-by-line to a file. It looks like this:. The answer here shows how to install a list of packages from a newline-delimited text file:.
Note a limitation here, packages you purged have a '-' in front of them. So you want to remove those lines before calling apt-mark. Even though the debfoster's website says that debfoster is deprecated in favor of aptitude, I prefer debfoster's prompt and simple configuration. It puts you in the middle of your package database and lets you clean things up, making the auto and manual packages more obvious. Type "h" at the debfoster prompt to explain your options.
Type "? The how-to here might be useful. Gives all manually installed packages not system packages, not dependencies. For examples it shows build-essential but not gcc. I then go in and manually filter out the apt-get install packages. There may be a way to do this programatically but I'm not aware of it. I didn't see any solutions here work for me, I have installed quite a few deb packages with dpkg and a few of the items I was particularly looking for were missing.
The above command saves a list of packages to a file in your current working directory named my-packages. I first built a list of packages that composed the baseline of packages selected during installation. I then compared the two files initial and installed to list only the items unique to installed.
From there I wanted to filter out the dependencies, this is where this method may miss some desired packages, it is unaware of dependencies that are also explicitly installed. After that I passed each line from my file custom into this function with xargs.
Once I had the long list of every possible dependency, not sure on the every possible statement , I once again got the lines that were unique to a single file.
And my finished list of packages is now in a file named manual available for me to review. Here is an updated version, based around compared currently installed packages compared to You will need aptitude installed, that is the only requirement. To break the above command down into parts, this bit outputs one package per line of everything installed on the system. Use a distribution manifest file as the base package set. Sort the manually installed results into package groups by architecture and section, so it's easier to focus on groups of packages maybe you don't care about some sections.
I didn't find one that was suitable for me, so I wrote a script. Script with 'apt list' verification. Modified from source. Will give you all the packages that have been installed at the command line using a variation of apt-get install. It gets the zipped files in the old history. This'll need a little modding eg with sed if you want just the package names on separate lines; an exercise for the reader!
This command is less conservative than safe-upgrade and thus more likely to perform unwanted actions. However, it is capable of upgrading packages that safe-upgrade cannot upgrade.
This command was originally named dist-upgrade for historical reasons, and aptitude still recognizes dist-upgrade as a synonym for full-upgrade. Cancels all scheduled actions on all packages; any packages whose sticky state indicates an installation, removal, or upgrade has this sticky state cleared. Forgets all internal information about what packages are "new" equivalent to pressing " f " when in visual mode.
Searches for packages matching one of the patterns supplied on the command line. For more information on search patterns, see the section "Search Patterns" in the aptitude reference manual. Each search result is listed on a separate line. The first character of each line indicates the current state of the package: the most common states are p , meaning that no trace of the package exists on the system, c , meaning that the package was deleted but its configuration files remain on the system, i , meaning that the package is installed, and v , meaning that the package is virtual.
The second character indicates the stored action if any; otherwise a blank space is displayed to be performed on the package, with the most common actions being i , meaning that the package will be installed, d , meaning that the package will be deleted, and p , meaning that the package and its configuration files will be removed. If the third character is A , the package was automatically installed. To customize the output of search, see the command-line options -F and --sort.
Displays detailed information about one or more packages, listed following the search command. If the verbosity level is 1 or greater i. Otherwise, information about the "candidate version" the version that aptitude install would download is displayed. If either of these is present, then only the version you request is displayed, regardless of the verbosity level. If the verbosity level is 1 or greater, the package's architecture , compressed size, file name , and md5sum fields are displayed.
If the verbosity level is 2 or greater, the select version or versions are displayed once for each archive found. Displays the versions of the packages listed on the command-line. The leftmost three characters indicate the current state, planned state if any , and whether the package was automatically installed; for more information on their meanings, see the documentation of aptitude search.
To the right of the version number you can find the releases from which the version is available, and the pin priority of the version. The order versions are displayed can be controlled by the command-line option --sort.
To prevent aptitude from formatting the output into columns, use --disable-columns. Adds a user tag to or removes a user tag from the selected group of packages. User tags are arbitrary strings associated with a package. They can be used with the? Explains the reason that a particular package should or cannot be installed on the system. This command searches for packages that require or conflict with the given package.
Note that the dependency that aptitude produced in this case is only a suggestion. This is because no package currently installed on this computer depends on or recommends the kdepim package; if a stronger dependency were available, aptitude would have displayed it. If no patterns are present, then aptitude will search for dependency chains beginning at manually installed packages. This effectively shows the packages that have caused or would cause a given package to be installed.
Aptitude why does not perform full dependency resolution; it only displays direct relationships between packages. By default, aptitude outputs only the "most installed, strongest, tightest, shortest" dependency chain. That is, it looks for a chain that only contains packages that are installed or will be installed; it looks for the strongest possible dependencies under that restriction; it looks for chains that avoid OR'ed dependencies and Provides; and it looks for the shortest dependency chain meeting those criteria.
These rules are progressively weakened until a match is found. If the verbosity level is 1 or more, then all the explanations aptitude can find are displayed, in inverse order of relevance. If the verbosity level is 2 or more, a truly excessive amount of debugging information will be printed to standard output. This command returns 0 if successful, 1 if no explanation could be constructed, and -1 if an error occurred.
Removes all previously downloaded. Removes any cached packages that can no longer be downloaded. This allows you to prevent a cache from growing out of control over time without completely emptying it.
Downloads and displays the Debian changelog for each of the given source or binary packages. By default, the changelog for the version which would be installed with aptitude install is downloaded. This will uninstall a package as well as orphaned dependencies along with its configuration files. As seen above, hold has been applied on python3 package.
It cancels any future installations, removal and upgrade of this package. The following is a way to hold a package along with install. To keep only the current version when there is a scheduled updates for packages, do the following:.
There is a provision to mark immediately after installing packages either as automatic or manual by override specifier as explained below. It is mainly used when you want to get a list of manually installed packages. The following displays the automatically installed packages count. To remove downloaded packages from the cache directory, do the following. Save my name, email, and website in this browser for the next time I comment.
0コメント