Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

New to Debian, how to use Aptitude and/or apt-get.

New to Debian (Or Linux in general)? Ask your questions here!
Post Reply
Message
Author
User avatar
MrUmunhum
Posts: 25
Joined: 2009-11-01 21:11

New to Debian, how to use Aptitude and/or apt-get.

#1 Post by MrUmunhum »

Hi group,

I am a long time Fedora user and decided to try Debian. So far, so good.

I am confused about how to install new packages, in Fedora I can use 'yum list \*wx\*' to see what is available for the wx files. How do I do that with Debian. I can't figure out aptitude at all.

My current project is a bootable USB stick ( which I have working ), I need to get gnuplot working. I used apt-get to get it installed but it won't run because it needs wxWidget.

Is there a "How To" for aptitude and/or apt-get??
William Estrada
Mt Umunhum, CA, USA
HTTP://64.124.13.3 ( Mt-Umunhum-Wireless.net )

User avatar
dilberts_left_nut
Administrator
Administrator
Posts: 5346
Joined: 2009-10-05 07:54
Location: enzed
Has thanked: 13 times
Been thanked: 66 times

Re: New to Debian, how to use Aptitude and/or apt-get.

#2 Post by dilberts_left_nut »

AdrianTM wrote:There's no hacker in my grandma...

User avatar
nadir
Posts: 5961
Joined: 2009-10-05 22:06
Location: away

Re: New to Debian, how to use Aptitude and/or apt-get.

#3 Post by nadir »

hello,
you say wx? or is it exactly wxWidget, just like you said? perhaps you run into this?
http://forums.debian.net/viewtopic.php? ... 11&start=0

edit:
sorry. i did a short

Code: Select all

apt-cache search wxWidget 
and the result looks like its something different (i for one would go for wx-common, but i really don't know) sorry.
"I am not fine with it, so there is nothing for me to do but stand aside." M.D.

User avatar
craigevil
Posts: 5391
Joined: 2006-09-17 03:17
Location: heaven
Has thanked: 28 times
Been thanked: 39 times

Re: New to Debian, how to use Aptitude and/or apt-get.

#4 Post by craigevil »

aptitude search ~nfoo

Or if you want in depth search variables take a look at:
Search Term Reference - http://algebraicthunk.net/~dburrows/pro ... 03s05.html

apt-dpkg-ref also available as a debian package
APT and Dpkg Quick Reference Sheet - http://www.cyberciti.biz/ref/apt-dpkg-ref.html

Code: Select all

#apt-get install foo .......................Installs foo package
#apt-get remove foo ........................Removes foo package
#apt-get remove --purge foo ................Removes foo package and its configuration files.
#apt-get update ............................Updates package database.
#apt-get -f install.........................Installs and removes packages in order to fix dependency problems.
#apt-get clean .............................Deletes all .deb packages from local repository.
#apt-get upgrade ...........................Upgrades all packages to its newer versions.
#apt-get dist-upgrade ......................Upgrades packages but also deals with dependency problems caused by new packages.
$apt-get source foo ........................Downloads foo package source files.
#apt-get -t unstable foo ...................Installs foo package searching for foo package and its dependencies at unstable version.
#apt-get foo/unstable ......................Installs foo package from unstable version, but searchs for dependencies without overriding priorities at /etc/apt/preferences file.
#apt-get build-dep foo .....................Installs all necessary packages to satisfy the build dependencies for foo source package.

$apt-cache show foo ........................Gives a long info description about foo package.
$apt-cache search foo ......................Searchs for packages that match "foo" pattern.

#apt-file update ...........................Resynchronize the package contents from their sources (/etc/apt/sources.list)
$apt-file search foo .......................Lists all packages containing files that match foo pattern. Searchs also in not installed packages.

#aptitude install foo ......................Installs foo package
#aptitude remove foo .......................Removes foo package
#aptitude remove --purge foo ...............Removes foo package and its configuration files.
$aptitude search foo .......................Searchs for packages that match "foo" pattern
#aptitude update ...........................Updates package database.
#aptitude upgrade ..........................Upgrades packages to its newer versions.
#aptitude safe-upgrade .....................Same as aptitude upgrade.
#aptitude full-upgrade .....................Upgrades packages to its newer versions, taking care about dependencies. Sames as dist-upgrade.
#aptitude hold foo .........................Marks foo package so it will not be removed or upgraded when executing safe-upgrade or full-upgrade
#aptitude unhold foo .......................Turn off the hold on foo package.
$aptitude show foo .........................Gives a long info description about foo package.
#aptitude clean ............................Removes all previously downloaded .deb files from the package cache directory.

#dpkg -i foo ...............................Installs foo package
#dpkg -i --force-depends foo ...............Converts all dependency errors into warnings and installs foo package.
#dpkg -r foo ...............................Removes foo package
#dpkg --purge foo ..........................Removes foo package and its configuration files too.
$dpkg -l *foo* .............................Lists packages containing "foo" pattern.
$dpkg -L foo ...............................Lists files pertaining to foo package.
#dpkg-reconfigure -plow foo ................Reconfigures previously installed "foo" package, asking all configuration questions.
#dpkg --configure -a ...........................Configures all packages that have been unpacked but not yet configured.
$dpkg --search foo .........................Lists packages containing files matching foo pattern. Only searchs on installed packages.

$dpkg-query -S foo .........................Searchs for a filename from installed packages listed in the local dpkg database.
 
Raspberry PI 400 Distro: Raspberry Pi OS Base: Debian Sid Kernel: 5.15.69-v8+ aarch64 DE: MATE Ram 4GB
Debian - "If you can't apt install something, it isn't useful or doesn't exist"
My Giant Sources.list

User avatar
stevepusser
Posts: 12930
Joined: 2009-10-06 05:53
Has thanked: 41 times
Been thanked: 71 times

Re: New to Debian, how to use Aptitude and/or apt-get.

#5 Post by stevepusser »

Synaptic is a pretty good GUI front-end to apt, and has search. Packagesearch is another GUI, more narrowly targeted, and can use either aptitude or apt as a back end. Aptitude has more "smarts" built in than apt, and can ofter resolve dependency problems that apt and Synaptic just refuse to even consider. If you stick to stable, odds are you will never see dependency problems, but if you start messing around with other repositories, all bets are off. I will say that aptitude has bailed me out of some tough situations that I have created.
MX Linux packager and developer

Post Reply