Updating a Specific Package in Linux Mint or Ubuntu

Have you ever tried to update a particular package looking for bug fix. Here’s how to update a particular package in any Linux Debian derivative like Ubuntu or Mint

sudo apt-get install package

this will install any dependencies. Or you could use this little script that checks wheather the package is installed or not and does the update (you need to runn as sudo): sudo script package

#updating package
#script should run with sudo priviliges
if [ -z "$1" ]; then
	echo USAGE: $(basename $0) packageName
	exit 1
#check if package is installed
dpkg -s "$1" | grep installed 2>/dev/null
if [ $? -eq 0 ]; then
	apt-get install -y --force-yes "$1"
	echo package "$1" not installed
Share This!

Add a Comment

Your email address will not be published.

Sign up for our Newsletter

Download "Google Search Pro"

Enter your email and stay on top of things,