Aptitude is amazing!

Message
Author
User avatar
Sparky
Posts: 1205
Joined: Sun Dec 23, 2018 6:07 pm

Aptitude is amazing!

#1 Post by Sparky »

Try aptitude of you are tired of apt.
sudo apt install aptitude tasksel (last command just beautifies the menu)
then enter aptitude, it is so much more intuitive than apt.

Here is a video link to help you start.
https://www.youtube.com/watch?v=xca3Ywf54N0
MX Linux Asus F552, 12GB RAM, 500GB WD SSD MX19.2
Dell Inspiron 7559 16GB RAM 1X 256GB SSD & 1TB SSD MX KDE 21.1 & Windows 11
Mini Tower PC 2X 256GB SSD MX KDE21.1

User avatar
Adrian
Developer
Posts: 9205
Joined: Wed Jul 12, 2006 1:42 am

Re: Aptitude is amazing!

#2 Post by Adrian »

Cool, didn't know about adding - and _ to the aptitude install packagename. I like that aptitude has all the useful command, don't need to muck with apt-cache for example to search for packages. Never use the GUI though.

User avatar
Buck Fankers
Posts: 770
Joined: Sat Mar 10, 2018 8:06 pm

Re: Aptitude is amazing!

#3 Post by Buck Fankers »

Nice, thanks for sharing...

Cheatsheet:

Code: Select all

============
  aptitude  
============
https://www.debian.org/doc/manuals/aptitude/ch02s04s05.en.html#tableSearchTermQuickGuide
https://www.youtube.com/watch?v=xca3Ywf54N0
https://www.christitus.com/2019/03/12/aptitude-explained/

sudo apt install aptitude tasksel

	# aptitude install
sudo aptitude install gedit		<- install one or more packages:
sudo aptitude install gedit–		<- remove a package
sudo aptitude install gedit_		<- purge a package
sudo aptitude install gedit=		<- hold a package at its current version
sudo aptitude install gedit&BD		<- build dependencies for a package

	# aptitude hold, unhold, keep
hold 					<– is the same as the install, but again I like to use this long hand version when utilizing wildcards.
unhold 					<– is a great way to release held packages
keep 					<– I DO NOT USE because it merely cancelled scheduled tasks for that package… only it will continue to be upgraded later. 

	# aptitude update, safe-upgrade, full-upgrade
update 					<– updates the cache
safe-upgrade 				<– upgrades all packages but will not remove unused packages
full-upgrade 				<– upgrades all packages but WILL remove unused packages

	# aptitude search
search <package> 			<– searches for the package, these search results can use wildcards, be sorted, and culled as needed using various options
    # examples:
aptitude search ‘?narrow(?installed, !?archive(stable))’	<- Search for packaged installed from outside stable repo
aptitude search ‘?narrow(?installed, ?archive(testing) !?archive(stable))’	<- Search for packages installed by the testing repo but not stable
aptitude search ~i		<- List installed packages
aptitude search ~Dgedit		<- List reverse dependencies for gedit
aptitude search ~b		<- show broken packages
aptitude search ~ahold		<- display packages on hold
aptitude search ~ntightvnc	<- Find and install all packages with the name tightvnc in it
aptitude install “php=5.6”	<- nstall a specific version of a package

	# aptitude show
aptitude show <package>		<- displays information about the package
	# aptitude why, why-not
aptitude why <package> 		<- explains why a package can’t be installs because of a missing dependency
aptitude why-not <package> 	<- show conflicts in which the package dependency can not be installed

	# aptitude clean and autoclean
aptitude clean 				<- removes all previously downloaded packages from the cache directory
aptitude autoclean			<- removes cached packages which no longer exist in your repositories

User avatar
Sparky
Posts: 1205
Joined: Sun Dec 23, 2018 6:07 pm

Re: Aptitude is amazing!

#4 Post by Sparky »

Hey that is a great reference you put there! I'm going to print it out, thanks!
MX Linux Asus F552, 12GB RAM, 500GB WD SSD MX19.2
Dell Inspiron 7559 16GB RAM 1X 256GB SSD & 1TB SSD MX KDE 21.1 & Windows 11
Mini Tower PC 2X 256GB SSD MX KDE21.1

Post Reply

Return to “General”