Upgrade a single package in Ubuntu
Answer:
To upgrade a single package, first need to perform an update first.
# sudo apt-get update
Then use the install sub command to perform an upgrade, e.g. apache2
#sudo apt-get install apache2
Linux Ask! is a Q & A web site specific for Linux related questions. Questions are collected, answered and audited by experienced Linux users.
Upgrade a single package in Ubuntu
Answer:
To upgrade a single package, first need to perform an update first.
# sudo apt-get update
Then use the install sub command to perform an upgrade, e.g. apache2
#sudo apt-get install apache2
Render web page using PyQt
Answer:
Qt bindings to WebKit have been added since 4.4, so you can use PyQt to script the browser (Webkit based).
Firstly, make sure you have installed the need packages:
# sudo apt-get install libqt4-core libqt4-webkit python-qt4
Then you can write a simple script to test, e.g.
#!/usr/bin/env python
import sys
from PyQt4.QtCore import *
from PyQt4.QtGui import *
from PyQt4.QtWebKit import *
app = QApplication(sys.argv)
web = QWebView()
web.load(QUrl("http://www.google.com"))
web.show()
sys.exit(app.exec_())
Remove downloaded archive files from apt-get
Answer:
To remove ownloaded archive files from apt-get to save spaces, try the following command:
# sudo apt-get clean
So all the unneeded archive files will be removed.
Compress and decompress file using 7zip
Answer:
7zip is a well known compression program if you need a very small file size, i.e. high compression ratio.
To install under Ubuntu/Debian:
# sudo apt-get install p7zip
To compress a file
# p7zip test.txt
To decompress a file
# p7zip -d test.txt.7z
How to completely uninstall a package in Ubuntu/Debian?
Answer:
To completely uninstall a package in Ubuntu/Debian, you can use the command below:
# sudo apt-get --purge remove PACKAGE
That's it.