If you want to upgrade the software in Ubuntu but want to keep one of them in the current state, that is, it will not be upgraded, you can use the command dpkg, aptitude or dselect for delayed upgrade/via1. use dpkg to select the software package for delayed upgrade: sudoecho "packagehold" | dpkg -- set-selections for example, to delay the upgrade of apache2 software package: sudoecho "apache2
If you want to upgrade the software in Ubuntu but want to keep one of them in the current state, that is, it will not be upgraded, you can use the command dpkg, aptitude or dselect to delay the upgrade/
1. Use dpkg
To select the software package for delayed upgrade:
Sudo echo "package hold" | dpkg -- set-selections
For example, to upgrade the apache2 package by delay:
Sudo echo "apache2 hold" | dpkg -- set-selections
Unselect:
Sudo echo "package hold" | dpkg -- set-selections
For example:
Sudo echo "apache2 hold" | dpkg -- set-selections
To use this command, you must understand the status of the selected software package.
2. Use aptitude
To select the software package for delayed upgrade:
Sudo aptitude hold package_name
Example:
Sudo aptitude hold apache2
Unselect:
Sudo aptitude unhold package_name
Example:
Sudo aptitude unhold apache2
3. Use dselect
If you have installed the dselect software package, you can first go to [S] elect screen, find the software package you want to delay the upgrade, and then press the "=" key or "H" key, then exit to take effect immediately. If you do not understand dselect usage, click link
In fact, apt-get and dselect use different files to store package information.
Apt:/var/lib/apt/lists/
Dselect/dpkg/tasksel:/var/lib/dpkg/
Difference between apt-get and dselect: link