Feeds:
Posts
Comments

Posts Tagged ‘Package Management’

If you find yourself trying to figure out which package contains a certain command, or any other file for that matter, apt-file is a command that will make this easy. It probably won’t be installed by default, so do so with this command:

sudo apt-get install apt-file

You will then be presented with the message:

The system-wide cache is empty. You may want to run ‘apt-file update’ as root to update the cache. You can also run ‘apt-file update’ as normal user to use a cache in the user’s home directory.

It’s probably best to run the former option (that is, as superuser), so enter the following:

sudo apt-file update

Let it update the cache, then you can search for the command or package or file. Simply use apt-file search followed by whatever it is you’re looking for. For example, we’ll search for the command ccsm, which is what runs the Compiz-Config Settings Manager, as there is no actual package of that name:

apt-file search ccsm

You might find the list presented is quite long, so it may pay to set your terminal to unlimited scrolling beforehand. In the case of the example, the line we’re looking for:

compizconfig-settings-manager: /usr/bin/ccsm

is not visible, since it is right near the top, which is beyond scrolling. If this happens to you, edit your terminal settings and run the command again.

Generally speaking, if it’s a command/program, then the line that has /usr/bin/ followed by the command (like ccsm) will be the correct one. The actual package that contains it will be listed at the beginning, in this case being compizconfig-settings-manager.

Remember, this can work with other types of files too, so if you’re looking for a specific config file or icon or whatever, just specify that at the end of the command. Eg:

apt-file search ccsm.desktop

Hopefully this is all you need to find that elusive file, or the package that installs a program you’re after.

☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻

Did this information make your day? Did it rescue you from hours of headache? Then please consider making a donation via PayPal, to buy me a donut, beer, or some fish’n’chips for my time and effort! Many thanks!

Buy Ubuntu Genius a Beer to say Thanks!

Advertisements

Read Full Post »

Unless you have a totally fresh install of Ubuntu, you have probably noticed that each time you boot up, the GRUB boot menu lists a bunch of previous Linux kernels which you can boot into. While this can occasionally come in handy – like if you can’t boot into the new kernel after an upgrade – those previous kernels, images and modules are usually just wasting space.

While you can go into Synaptic, search for all the bits and pieces of previous kernels, and mark them for removal, here is a much easier method. In a terminal, simply paste the following command, and it will remove all but the current kernel (if you’ve upgraded your system, or had an update with a new kernel, please reboot your machine before running this):

dpkg -l 'linux-*' | sed '/^ii/!d;/'"$(uname -r | sed "s/\(.*\)-\([^0-9]\+\)/\1/")"'/d;s/^[^ ]* [^ ]* \([^ ]*\).*/\1/;/[0-9]/!d' | xargs sudo apt-get -y purge

You will see some info about what is going on:

The following packages will be REMOVED:
linux-headers-2.6.35-22* linux-headers-2.6.35-22-generic*
linux-headers-2.6.35-23* linux-headers-2.6.35-23-generic*
linux-image-2.6.32-25-generic* linux-image-2.6.35-22-generic*
linux-image-2.6.35-23-generic*
0 upgraded, 0 newly installed, 7 to remove and 13 not upgraded.
After this operation, 586MB disk space will be freed.
(Reading database … 261863 files and directories currently installed.)
Removing linux-headers-2.6.35-22-generic …
Removing linux-headers-2.6.35-22 …
Removing linux-headers-2.6.35-23-generic …
Removing linux-headers-2.6.35-23 …
Removing linux-image-2.6.32-25-generic …

It will then go on to generate a new GRUB menu, and when you reboot, you’ll see only the current kernel is listed.

☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻

Did this information make your day? Did it rescue you from hours of headache? Then please consider making a donation via PayPal, to buy me a donut, beer, or some fish’n’chips for my time and effort! Many thanks!

Buy Ubuntu Genius a Beer to say Thanks!

Read Full Post »

The Search bar in Firefox – which many still look at as the “Google bar”, even though it lists other search engines – is extremely useful, but you can make it even more so by adding all sorts of search options.

What we’ll look at here is the “Search Ubuntu packagesadd-on, which (as the name suggests) lets you hunt for software for Ubuntu directly from the Search bar. All you have to do is go to the download page and click the Add to Firefox button, restart Firefox, and it’s done.

Alternatively, if you’re browsing the Firefox Add-on index you can just click the Add to Firefox button next to “Search Ubuntu packages“, and confirm by clicking Add.

Once you restart Firefox, your new search option will be in the Search bar’s drop-down menu. When wanting to search for software, select Ubuntu packages, type the name of the program or package, and hit Enter.

Like all new additions to the Search menu, it will appear at the bottom, so if you’d like to move closer to the top, click Manage Search Engines… (at the bottom of that menu) and move it where you want with the up arrow.

Note that once you’ve used it, it will stay as the default search option till you choose another (so make sure you choose Google or whatever before doing a regular web search).

Search Ubuntu packages

☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻

Did this information make your day? Did it rescue you from hours of headache? Then please consider making a donation via PayPal, to buy me a donut, beer, or some fish’n’chips for my time and effort! Many thanks!

Buy Ubuntu Genius a Beer to say Thanks!

Read Full Post »

When you uninstall a program in Ubuntu, sometimes bits and pieces like configuration files are left behind. Occasionally this is a good thing, like when you remove a program due to some issues you’re having with it and then reinstall it again, since your old settings are usually restored.

But more often than not, when a program is uninstalled it is because the user doesn’t want it, so any remaining configuration files are just wasting space. And often in the case of trying to reinstall a program to get it to work properly, a configuration setting is what is causing the issue, so a complete removal is needed.

There are 2 ways to go about this: via the user-friendly GUI of Synaptic (or your preferred package manager), or the much faster way of command-line in a terminal.

Either way, you’ll of course need to know the name of the program, and if possible the actual package name. While often the package name is the same as the program’s displayed name, but in lowercase, this isn’t always the case, so if unsure check out these ways of finding out.

If you want to use Synaptic, open it and enter the name of the program or package in the Quick search bar. When it and related packages appear, right-click the main package and choose “Mark for Complete Removal“.

It is usually fairly easy to tell which is the main base package; if the name isn’t a give-away, the information after it should clear things up. For example, AbiWord is actually abiword, so is instantly recognisable from the other packages that install with it.

When you “Mark for Complete Removal“, you will be informed if other packages also need to be removed, meaning you don’t have to do this manually.

When you accept the proposed changes, you will see that the program and additional packages will be removed. If there are other related packages that haven’t been automatically selected, you can do so manually before proceeding.

When ready, simply click the Apply button in the Synaptic toolbar. You will receive a final request for confirmation, after which the program will be removed, along with the extra packages and any configuration files.

As in the case of the AbiWord example, not everything is always automatically selected for removal, so it pays to look through the search results and see if anything needs to be removed manually (abiword-common is actually larger than the other packages combined at nearly 9Mb). Doing this before proceeding with the last step will save you coming back later.

If you prefer the quicker command-line method, open a terminal and enter:

sudo apt-get purge packagename (replacing “packagename” with the actual name of the package in question).

If you’re familiar with apt-get remove and wondering what is the difference, especially since additional packages are also marked for removal, the answer is that configuration files are often left behind if you simply “remove” the app. To get that command to work, the --purge option needs to be added (eg: sudo apt-get remove --purge packagename). You will still see much mention online that this is the way to do it, but since then the purge command has been added to apt-get, so this is no longer needed (though for backwards compatibility, remove --purge will continue to work).

Either way you choose to do it, you should be able to get rid of all the junk that programs can leave behind when simply removed. Just keep in mind that if you ever saved any settings or user profiles etc, occasionally these can still be left behind, but they will be in config folders within your home folder (you might need to enable displaying of hidden files and folders). If you ever get a message that a certain folder could not be removed, or a certain file, just go in there later and remove it.

°ºÒθÓº°¤°ºÒθÓº°¤°ºÒθÓº°

Leave some unwanted packages behind? It’s actually pretty easy to get rid of the vast majority of packages that weren’t automatically selected for removal. When you install via the terminal, you will notice that a list of orphaned packages is presented along with the simple command to remove them all in one go.

As you can see in the example, after uninstalling AbiWord the abiword-common package was left behind (not to mention a few libraries), but you can easily remove it and others taking up space with the following command:

sudo apt-get autoremove

☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻

Did this information make your day? Did it rescue you from hours of headache? Then please consider making a donation via PayPal, to buy me a donut, beer, or some fish’n’chips for my time and effort! Many thanks!

Buy Ubuntu Genius a Beer to say Thanks!

Read Full Post »

Sometimes the easiest solution is right in front of our eyes, and we fail to see it (probably because it’s too obvious). While looking through the forums it’s become evident to me that some people are needlessly driving themselves nuts browsing through categories in Synaptic Package Manager, desperately trying to find that program to install or remove, when they could be using the Quick search bar in plain view in the toolbar.

While the program’s displayed name and actual package or command name can vary, in most cases, typing in either will get you results.

If you know the actual package name, type that in, otherwise just type in the displayed name you’re familiar with. Results will immediately appear underneath.

You can even use this just to find out the package name, which could be handy for recreating a launcher you deleted. As an example, if you accidentally deleted the “Compiz Fusion Icon” launcher from your System Tools menu, you could type that into the Quick search bar and find that fusion-icon is the actual command, so use that info to make a new launcher.

Of course, if you’re looking for new software for specific tasks, and don’t know any program names, you need another approach. While I actually recommend Googling to find what’s out there, so you can read reviews and see screenshots, it’s actually very easy to use Synaptic to do it all for you. While there are different categories you can browse on the left, that can be somewhat overwhelming. So simply enter the type of software you are looking for, and you should get some results to browse through.

You can then view all the info that the developer has given by clicking on a program and reading what’s in the Description tab at the bottom.

You can add important words to help limit your results. For example, “video convert” will weed out the players, libraries, plugins and codecs that would also be presented if you merely typed in “video“.

You can then look at the Description to see if the programs are what you need.

Using these simple methods, you should be able to find all the software you’ll ever need. Note that to increase your chances of finding everything that’s available, Synaptic‘s list of repositories (ie: places to find software) needs to be a fair bit more extensive than you get in a vanilla install of Ubuntu. So check out these topics on how to add more repos:

Add the Universe and Multiverse Repositories

Add More Repos & Play Encrypted DVDs with Medibuntu

☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻

Did this information make your day? Did it rescue you from hours of headache? Then please consider making a donation via PayPal, to buy me a donut, beer, or some fish’n’chips for my time and effort! Many thanks!

Buy Ubuntu Genius a Beer to say Thanks!

Read Full Post »

Programs and packages available for Ubuntu generally come in both 32-bit (“i386”) and  64-bit (“amd64”) versions, and Synaptic will only look for those that suit your hardware architecture. But occasionally you may hear of a good app or game that you need to download from the author’s site, only to find there is no 64-bit version available.

If there is a source version that you need to compile manually (it will usually have a .tar.gz extension), then that is your best option for a 64-bit system. But increasingly developers are packaging their programs directly for Ubuntu (ie: as .deb installers), but only in 32-bit. If you try to install a 32-bit program in Ubuntu, you will likely get the following error message:

Error: Wrong architecture ‘i386’

At this point the installation will halt, but there is a way to install 32-bit programs on 64-bit systems. You can force install them by opening a terminal in the folder with the package, then entering the following command:

sudo dpkg --force-architecture -i filename.deb

Just remember to replace the last bit with the actual file name, which you can avoid typing by dragging the file to the terminal after typing the bulk of the command.

☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻

Did this information make your day? Did it rescue you from hours of headache? Then please consider making a donation via PayPal, to buy me a donut, beer, or some fish’n’chips for my time and effort! Many thanks!

Buy Ubuntu Genius a Beer to say Thanks!

Read Full Post »

You can find out the version number of any program in Ubuntu, right down to the specific package number, quickly and easily via the terminal. Simply enter apt-cache policy followed by the name of the program, command or other package. As you can see from the following example, you can get info on multiple packages at once:

apt-cache policy k3b kalarm gedit
k3b:
Installed: 1.68.0~alpha3-0ubuntu1
Candidate: 1.68.0~alpha3-0ubuntu1
Version table:
*** 1.68.0~alpha3-0ubuntu1 0
500 file: karmic/main Packages
500 http://us.archive.ubuntu.com karmic/main Packages
100 /var/lib/dpkg/status
kalarm:
Installed: 4:4.3.2-0ubuntu6
Candidate: 4:4.3.2-0ubuntu6
Version table:
*** 4:4.3.2-0ubuntu6 0
500 http://us.archive.ubuntu.com karmic/main Packages
100 /var/lib/dpkg/status
gedit:
Installed: 2.28.0-0ubuntu2
Candidate: 2.28.0-0ubuntu2
Version table:
*** 2.28.0-0ubuntu2 0
500 file: karmic/main Packages
500 http://us.archive.ubuntu.com karmic/main Packages
100 /var/lib/dpkg/status

If you don’t know the actual command name of the program in question, look at the properties of its launcher to find out.

☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻

Did this information make your day? Did it rescue you from hours of headache? Then please consider making a donation via PayPal, to buy me a donut, beer, or some fish’n’chips for my time and effort! Many thanks!

Buy Ubuntu Genius a Beer to say Thanks!

Read Full Post »

Older Posts »