Documentation for apt

If none of the more specific forums is the right place to ask
Post Reply
Message
Author
mm3100
Posts: 138
Joined: 2020-10-21 21:39
Has thanked: 3 times

Documentation for apt

#1 Post by mm3100 »

Hello there,

After some use found out apt has option rdepends

Code: Select all

apt rdepends
Looking in manual it is not mentioned, after that I looked in "The Debian GNU/Linux FAQ", "The Debian Administrator's Handbook" and it wasn't mentioned there as well.

Only in "Debian Reference" there is one line about it
The "aptitude why <regex>" can list more information by "aptitude -v why <regex>". Similar information can be obtained by "apt rdepends <package>" or "apt-cache rdepends <package>".
Looking in source https://salsa.debian.org/apt-team/apt, they only mention tools included in apt, but not how syntax for options is changed. Is there a complete documentation on apt for all of its options and flags?

arzgi
Posts: 800
Joined: 2008-02-21 17:03
Location: Finland
Been thanked: 4 times

Re: Documentation for apt

#2 Post by arzgi »

Code: Select all

man apt

User avatar
4D696B65
Site admin
Site admin
Posts: 2629
Joined: 2009-06-28 06:09
Been thanked: 5 times

Re: Documentation for apt

#3 Post by 4D696B65 »

arzgi wrote:

Code: Select all

man apt
It's not in the man page

From man apt
Much like apt itself, its manpage is intended as an end user interface and as such only mentions the most used commands and options
partly to not duplicate information in multiple places and partly to avoid overwhelming readers with a cornucopia of options and
details.


mm3100
Posts: 138
Joined: 2020-10-21 21:39
Has thanked: 3 times

Re: Documentation for apt

#5 Post by mm3100 »

My problem here isn't rdepend it self, rather lack of documentation for apt. As right now I don't know where to look what are all of apt options and abilities from all those tools it is including. Looking each of those tools, like apt-get can't help me much, since there might be difference in syntax, for example apt-get uses dist-upgrade while apt uses full-upgrade.

User avatar
sunrat
Global Moderator
Global Moderator
Posts: 3693
Joined: 2006-08-29 09:12
Location: Melbourne, Australia
Has thanked: 3 times
Been thanked: 7 times

Re: Documentation for apt

#6 Post by sunrat »

Indeed I have noticed the man page for apt is a bit lacking. One can use apt list -i instead of apt list --installed which is not mentioned. I have used apt depends and apt rdepends regularly, not sure how I knew about it though.
apt will treat dist-upgrade the same as full-upgrade. And the man mentions /usr/share/doc/apt-doc/ which contains no mention of the newer apt, only apt-get.
Developers have a reputation for avoiding writing documentation but this is such a commonly used one it would be nice for a bit of sharing the secret information. Bug reports from users may help.
“ computer users can be divided into 2 categories:
Those who have lost data
...and those who have not lost data YET ”
Remember to BACKUP!

mm3100
Posts: 138
Joined: 2020-10-21 21:39
Has thanked: 3 times

Re: Documentation for apt

#7 Post by mm3100 »

I was disappointed in apt-doc, for a package that should contain documentation it has even less information then other sources I mentioned. I did report wishlist bug for additional documentation, as for such important tool it is rather embarrassing to have such lacking information on.

arzgi
Posts: 800
Joined: 2008-02-21 17:03
Location: Finland
Been thanked: 4 times

Re: Documentation for apt

#8 Post by arzgi »

Best description of apt packaging and apt package internals was in Martin Krats's book The Debian System: Concepts and Tehcnigues. It' is at least decade old now, and I game mine away.

mm3100
Posts: 138
Joined: 2020-10-21 21:39
Has thanked: 3 times

Re: Documentation for apt

#9 Post by mm3100 »

I found a copy and checked it out, but it is a bit outdated so no much of use for current apt documentation.

User avatar
sunrat
Global Moderator
Global Moderator
Posts: 3693
Joined: 2006-08-29 09:12
Location: Melbourne, Australia
Has thanked: 3 times
Been thanked: 7 times

Re: Documentation for apt

#10 Post by sunrat »

Re depends and rdepends, these were inherited from the apt-cache command and are mentioned in man apt-cache.
“ computer users can be divided into 2 categories:
Those who have lost data
...and those who have not lost data YET ”
Remember to BACKUP!

mm3100
Posts: 138
Joined: 2020-10-21 21:39
Has thanked: 3 times

Re: Documentation for apt

#11 Post by mm3100 »

So is dist-upgrade from apt-get but is renamed to full-upgrade. As such, just looking at tools included in apt doesn't give guarantee. I can't remember right now but there are other options that have changes as well.

User avatar
sunrat
Global Moderator
Global Moderator
Posts: 3693
Joined: 2006-08-29 09:12
Location: Melbourne, Australia
Has thanked: 3 times
Been thanked: 7 times

Re: Documentation for apt

#12 Post by sunrat »

The apt command basically combines the most commonly used user commands from apt-get, apt-cache, and also dpkg -i. It adds some useful features such as a progress bar and the ability to list upgradeable, installed, and available packages, and to edit sources.
Read https://www.linux-magazine.com/Issues/2 ... s.-apt-get
The older commands are not going away and are still recommended to use in scripting.
“ computer users can be divided into 2 categories:
Those who have lost data
...and those who have not lost data YET ”
Remember to BACKUP!

MALsPa
Posts: 673
Joined: 2007-12-07 19:20
Location: albuquerque

Re: Documentation for apt

#13 Post by MALsPa »

sunrat wrote:Re depends and rdepends, these were inherited from the apt-cache command and are mentioned in man apt-cache.
Score!! And of course man apt-cache is mentioned at the bottom of man apt:

Code: Select all

SEE ALSO
       apt-get(8), apt-cache(8), sources.list(5), apt.conf(5), apt-config(8), The APT User's
       guide in /usr/share/doc/apt-doc/, apt_preferences(5), the APT Howto.
Well, I guess the documentation is there, if you can find it! Lol.

mm3100
Posts: 138
Joined: 2020-10-21 21:39
Has thanked: 3 times

Re: Documentation for apt

#14 Post by mm3100 »

MALsPa wrote:Score!! And of course man apt-cache is mentioned at the bottom of man apt:
Well, I guess the documentation is there, if you can find it! Lol.
This is wrong approach to get information about apt, for example for apt there are no options such as

Code: Select all

apt-cache stats
apt-cache showpkg
Problem as with dist-upgrade to full-upgrade from apt-get, there might be analogues of those apt-cache options for apt but renamed or with changed syntax. Issue being that there is no such documentation for apt, and there is no way of knowing whether it has them or not. In source for apt it is said it includes apt-cache tool, but not what is included from it, is it all but renamed, or only selected few?

MALsPa
Posts: 673
Joined: 2007-12-07 19:20
Location: albuquerque

Re: Documentation for apt

#15 Post by MALsPa »

Yeah, I agree with you, mm3100. The documentation could be better, no question. But I think there are quite a few of us who get along okay doing all package management from the command line. (I used to rely on Synaptic, but I don't use it anymore.) Users might have to dig a bit to uncover certain details. Like sunrat, I've been using rdepends, but I don't remember where I found out about it. Maybe the real problem is not enough people volunteering to help out with the documentation.

mm3100
Posts: 138
Joined: 2020-10-21 21:39
Has thanked: 3 times

Re: Documentation for apt

#16 Post by mm3100 »

I never argued apt doesn't work well, just that it has many more options and abilities that aren't documented and as such not known. And when you want to find out what it can it is hard to find.

arzgi
Posts: 800
Joined: 2008-02-21 17:03
Location: Finland
Been thanked: 4 times

Re: Documentation for apt

#17 Post by arzgi »

There is always the hard way: install source and inspect that. Depends if you have done any programming, if any use.

Post Reply