castanyes blaves

Random ramblings about some random stuff, and things; but more stuff than things -- all in a mesmerizing and kaleidoscopic soapbox-like flow of words.

3/24/2005

 
aptget

All these commands require sudo!

* apt-get update - Run this after changing /etc/apt/sources.list or /etc/apt/preferences. You also must run it periodically to make sure your source list is up-to-date.

* apt-get install packagename - installs a new package (but see aptitude, below)

* apt-cache search string - Searches for string in the list of known packages

* dpkg -l package-name-pattern - List packages matching pattern

* aptitude - Curses viewer of packages installed or available. Aptitude can be used from the command-line in a similar way to apt-get, but only for some commands - install and remove being the most common. However, because aptitude keeps track of more information than apt-get does, it can be considered better at install and remove operations.

* apt-cache showpkg pkgs - Show information about packages.

* apt-cache dumpavail - Prints out an available list.

* apt-cache show pkgs - Displays package records, similar to dpkg --print-avail.

* apt-cache pkgnames - Fast listing of every package in the system.

* dpkg -S file - Which installed package owns the file?

* dpkg -L package - List files in the package.

* apt-file search filename - Search for a package (need not be installed) containing files including the string. apt-file is a package of its own, which you may have to apt-get install first, then run apt-file update. If apt-file search filename shows you too much, try apt-file search filename | grep -w filename (which shows you only the files that contain filename as a whole word) or variants like apt-file search filename | grep /bin/ only files located in directories like /bin or /usr/bin, useful if you're looking for a particular executable).

* apt-get autoclean - Run this periodically to clean out .deb archives from packages which are no longer installed on the system. You can regain lots of disk space that way. If you're really desperate for disk space, apt-get clean is more radical, and will remove .deb files even for packages currently installed. But most of the time you probably don't need the .debs any more, so it might be worth it if you're strapped for megabytes.


Comments: Post a Comment

Subscribe to Post Comments [Atom]





<< Home

Archives

200409   200412   200501   200502   200503   200504   200505   200506   200507   200508   200509   200510   200511   200512   200601   200602   200603   200604   200605   200606   200607   200608   200609   200610   200611   200612   200701   200702   200703   200704   200705   200707   200708   200709   200710   200711   200712   200801   200802   200803   200804   200805   200806   200807   200808   200809   200810   200811   200812   200901   200902   200903   200904   200905   200906   200907   200908   200909   200912   201001   201002   201003   201004   201007   201009   201011   201102  

This page is powered by Blogger. Isn't yours?

Subscribe to Posts [Atom]