Apt
From Attie's Wiki
(Difference between revisions)
(Created page with "==apt-get== Update the local cache of the repositories: <source lang="bash"> sudo apt-get update </source> Update all installed packages <source lang="bash"> sudo apt-get upg...") |
m (→dpkg) |
||
(7 intermediate revisions by one user not shown) | |||
Line 8: | Line 8: | ||
<source lang="bash"> | <source lang="bash"> | ||
sudo apt-get upgrade | sudo apt-get upgrade | ||
+ | </source> | ||
+ | |||
+ | Remove a package | ||
+ | <source lang="bash"> | ||
+ | sudo apt-get remove ${PACKAGE} | ||
</source> | </source> | ||
Line 26: | Line 31: | ||
apt-file search rpmbuild | apt-file search rpmbuild | ||
</source> | </source> | ||
+ | |||
+ | List the files that belong (or would be installed by a package): | ||
+ | <source lang="bash"> | ||
+ | apt-file list git-deamon-run | ||
+ | </source> | ||
+ | |||
+ | ==dpkg== | ||
+ | To list the installed packages: | ||
+ | <source lang="bash"> | ||
+ | dpkg -l | ||
+ | </source> | ||
+ | |||
+ | To list the files installed by an ''installed'' package: | ||
+ | <source lang="bash"> | ||
+ | dpkg -L ${package} | ||
+ | </source> | ||
+ | |||
+ | To list the files that ''would'' be installed by a package | ||
+ | <source lang="bash"> | ||
+ | dpkg -c ${.deb file} | ||
+ | </source> | ||
+ | |||
+ | To find which package owns a file | ||
+ | <source lang="bash"> | ||
+ | dpkg -S ${filename} | ||
+ | </source> | ||
+ | |||
+ | To install | ||
+ | <source lang="bash"> | ||
+ | dpkg -i ${.deb file} | ||
+ | </source> | ||
+ | |||
+ | To remove | ||
+ | <source lang="bash"> | ||
+ | dpkg -r ${package} | ||
+ | </source> | ||
+ | |||
+ | More here: http://www.cyberciti.biz/howto/question/linux/dpkg-cheat-sheet.php |
Latest revision as of 00:11, 5 January 2015
Contents |
[edit] apt-get
Update the local cache of the repositories:
sudo apt-get update
Update all installed packages
sudo apt-get upgrade
Remove a package
sudo apt-get remove ${PACKAGE}
[edit] apt-cache
Use to locate packages by searching name and description:
apt-cache search tree
[edit] apt-file
Use to locate packages that provide a given file. First you must retrieve the database & indexes:
sudo apt-file update
Then search for the file:
apt-file search rpmbuild
List the files that belong (or would be installed by a package):
apt-file list git-deamon-run
[edit] dpkg
To list the installed packages:
dpkg -l
To list the files installed by an installed package:
dpkg -L ${package}
To list the files that would be installed by a package
dpkg -c ${.deb file}
To find which package owns a file
dpkg -S ${filename}
To install
dpkg -i ${.deb file}
To remove
dpkg -r ${package}
More here: http://www.cyberciti.biz/howto/question/linux/dpkg-cheat-sheet.php