Powerful apt-GET command (Summary)

Source: Internet
Author: User

I. the most convenient non-Apt-Get tool for management software in Ubuntu does not belong to anyone. Its common usage is sorted out for future reference (see man apt-Get for details ):

1. Update the source. Do this before upgrading the software and system ~ (Source directory:/Etc/APT/sources. List)

 
Sudo apt-Get update

2. Update the installed package to the latest version (skip this step if it is the latest version)

 
Sudo apt-Get upgrade

3.Upgrading the system is risky! At this time, APT will first upgrade important packages. If there is a conflict, some secondary packages may be deleted (see man apt_preferences)

 
Sudo apt-Get dist-Upgrade

4. Install (upgrade) one or more software. You can also specify the version number to install a specific software version. You can also use regular expression matching for PAC.

 
Sudo apt-Get install pac1 pac2 pac3...

5. Delete the software in the same way as install. The configuration file will be retained.

 
Sudo apt-Get remove pac1 pac2 pac3...

6. The configuration file will also be deleted in the same way as remove (this is more thorough)

 
Sudo apt-Get purge pac1 pac2 pac3...

7. Get the source code to the current folder.

 
Sudo apt-Get source Pac

8.Install the relevant compiling environment

Sudo apt-Get build-dep Pac

9. Update cache,Check for any corrupted dependency

 
Sudo apt-Get check

10. Download the binary package to the current directory.

 
Sudo apt-Get download Pac

11. clears out the local repository of retrieved package files to release disk space

 
Sudo apt-Get clean

12. clears out the local repository of retrieved package files, clear undownloadable and useless packages, and release disk space

 
Sudo apt-Get autoclean

13. Remove packages that were automatically installed to satisfy dependencies for some packages and that are no more needed.

 
Sudo apt-Get autoremove

14. Other parameters, such as-y-m-F, are combined to provide more powerful functions. We will not list them one by one. Update the system first!

 

Ii. Source and upgrade

1. Update source/etc/APT/sources. List

2. Upgrade version

SudoApt-GetInstallUpdate-manager-CoreSudo Do-Release-Upgrade

3. view the current version and kernel version:

 
Lsb_release-
Uname-

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.