Ubuntu Local Source Creation and local source maintenance (delete expired or repeated software packages)

Source: Internet
Author: User
1. all software packages installed from the software repository are cached in the local/var/cache/apt/archives file. In addition, it is very troublesome to reinstall the Chinese Language Pack on the Internet after Ubuntu is installed. In addition, it is very troublesome to install the copyright driver of MP3 and other audio and video programs every time. Therefore, it is necessary to create the local source. To get back to business, you must first install

1. Make software source


Anyone who has been using Ubuntu Lucid Lynx (Ubuntu 10.04) For A While should know that all software packages installed from the software repository will be locally

/Var/cache/apt/archives

. In addition, it is very troublesome to reinstall the Chinese Language Pack on the Internet after Ubuntu is installed. In addition, it is very troublesome to install the copyright driver of MP3 and other audio and video programs every time. Therefore, it is necessary to create the local source.

To put it bluntly, you must first install the software package dpkg-dev.

# Sudo apt-get install dpkg-dev

After configuration, create a directory under/as the storage location of the software package, or place it in any location on the hard disk.

Copy all packages in/var/cache/apt/archives to this folder.

Run the following command to create the software source:

# Sudo dpkg-scanpackages/software/dev/null | gzip>/software/Packages.gz

After the system scans all the software packages, it returns to the command line and generates a compressed file named packages.gz in the softwarefolder, which contains the package information in the folder and its dependencies.


2. Use software sources


Link

# Sudo gedit/etc/apt/sources. list

Delete all content, add

Deb file: // software/

Save.


Open the terminal and enter

# Sudo apt-get update

To update the local package list

Then you can use the apt-get command to install the software package contained in the local source or directly execute it like me.

# Sudo apt-get dist-upgrade

Command to update the system. If you are more lazy, enter the following command:

# Sudo apt-get update; sudo apt-get dist-upgrade

.

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.