You are not logged in.
Pages: 1
I think I collected all of these from forums.debian.net (and I have not tested all of them.)
Edit: I'm adding code boxes to the ones I test. Note that some of these commands may give you strange results if you have multiple repos enabled, like jessie,ascii,ceres. Don't do that!
-fsr
------------------------
To find which installed packages are from debian-multimedia (works as user):
dpkg-query -W --showformat='${Package}\t${Maintainer}\n' |grep "Christian Marillat"
To show packages from contrib and non-free, either one of the following. The second is more specific. (e.g. the first one gives a false positive on libclucene-contribs1 because "contrib" is in the package name.)
dpkg-query -W --showformat='${Package}\t${Section}\n' | egrep -e "non-free|contrib"
dpkg-query -W --showformat='${Package}\t${Section}\n' | awk '/non-free|contrib/ { print $0 }'
Re: List installed software from non-free repo
bugsbunny » 2011-01-30 08:50
aptitude search ~i~s"non-free~|contrib"
or
aptitude search ~i~snon-free ~i~scontrib
If you want package names, section, and archive (testing, stable, unstable):
aptitude search ~i~snon-free ~i~scontrib -F"%p# %s# %t#"
or maybe name, version, archive
aptitude search ~i -F"%p# %v# %t#"
get package names and sizes, sorted by size:
dpkg-query -W --showformat='${Installed-Size}\t${Package}\n' > package_sizes
awk '{ printf "%.7d %s\n", $1, $2 "\n" }' package_sizes | sort
Show which repo (which release) packages came from:
aptitude search "?narrow(?installed,?archive(stable))"
aptitude search "?narrow(?installed,?archive(oldstable))"
Or did not come from:
aptitude search "?narrow(?installed,?not(?archive(stable)))"
To get a list of dependencies from a .deb file:
$ dpkg -e d4x_2.5.7.1-5_amd64.deb
$ su
Password:
# DEPS=$(grep ^Depends DEBIAN/control | sed 's/,/\n/g' | sed 's/(.*//;s/Depends: //;s/^ //')
# apt-get update
# apt-get install $DEPS ### Bad idea!!! This installs everything in the list. There may be redundancies.
# apt-get clean
# exit
This line works if there's a "|" in the output.
DEPS=$(grep ^Depends DEBIAN/control | sed 's/,/\n/g' | sed 's/(.*//;s/Depends: //;s/^ //;s/|.*$//')
Better way:
dpkg -i my-deb_5.0-6_i386.deb
apt-get -f install
Offline
This info has been copied, pasted, and filed away into my "notes" folder for future reference. It will come in handy.
Thanks fsr!
Offline
dpkg --get-selections > package.list
Offline
Ooohhh! Very cool. Thanks for this
Offline
Pages: 1